effective_test_bot 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9718dff008026433cc1541ce36c27eefbf396777
4
- data.tar.gz: 6710d59f4c60c6861a450d7c1b277bc32b1d6eaa
3
+ metadata.gz: 3e527752317f5fa4794ff447b856c3d975d4bf88
4
+ data.tar.gz: c4fd0acdfbc5bbb1d6435dd9cf01eaf3673b3320
5
5
  SHA512:
6
- metadata.gz: 14251ee81b143df1aa5f70f72cde976fd2f288f8df5dda323f301799f4001f87962b84e4d3e0af3423e404c8ad27c801d81063147770e2cc2904807c57d141a4
7
- data.tar.gz: f65722976ab5a9974736d7cabf9a7a6e3fb983711dbcae8ff8c88c6092fa17629be239c7ed3b17265149f88fca25ea1b0c35240b3a1a958d5f84b4bf6ef80a1d
6
+ metadata.gz: 783e6c019ce1fa4316c894d2cbddf121ea0986b2d00ad55f770fed20dd5da220b437194d66d3e5bc1504b3d7724fc016a4a969bdd208f801a851cb46b71ca17a
7
+ data.tar.gz: fe44090e65b67525eb9ae2b2456a661307cce75b4c81ac701353d785e30fccc22df9554e03d4107796a1c78fc582d726ee59a341c4383446cf1f43e04983b921
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.5.1'.freeze
3
3
  end
@@ -29,6 +29,10 @@ module EffectiveTestBotFormHelper
29
29
  end
30
30
 
31
31
  assert_no_unpermitted_params unless test_bot_skip?(:no_unpermitted_params)
32
+ assert_no_assigns_errors unless test_bot_skip?(:no_assigns_errors)
33
+ assert_no_exceptions unless test_bot_skip?(:exceptions)
34
+ assert_page_status unless test_bot_skip?(:page_status)
35
+
32
36
  true
33
37
  end
34
38
 
@@ -9,7 +9,14 @@ module EffectiveTestBotLoginHelper
9
9
 
10
10
  # This is currently hardcoded to use the warden login_as test helper
11
11
  def sign_in(user)
12
- user.kind_of?(String) ? login_as(User.find_by_email!(user)) : login_as(user)
12
+ if user.kind_of?(String)
13
+ login_as(User.find_by_email!(user))
14
+ elsif user.kind_of?(User)
15
+ raise 'user must be persisted' unless user.persisted?
16
+ login_as(user)
17
+ else
18
+ raise 'sign_in(user) expected a User or an email String'
19
+ end
13
20
  end
14
21
 
15
22
  # This is currently hardcoded to use the warden logout test helper
@@ -63,5 +63,12 @@ module TestBot
63
63
  assert_jquery_ujs_present
64
64
  end
65
65
 
66
+ test '11: action_mailer.default_url_options are present' do
67
+ assert(
68
+ (Rails.application.config.action_mailer.default_url_options[:host] rescue nil).present?,
69
+ "expected action_mailer.default_url_options[:host] to be present.\nAdd config.action_mailer.default_url_options = { host: 'example.com' } to config/environments/test.rb"
70
+ )
71
+
72
+ end
66
73
  end
67
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_test_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect