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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e527752317f5fa4794ff447b856c3d975d4bf88
|
4
|
+
data.tar.gz: c4fd0acdfbc5bbb1d6435dd9cf01eaf3673b3320
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 783e6c019ce1fa4316c894d2cbddf121ea0986b2d00ad55f770fed20dd5da220b437194d66d3e5bc1504b3d7724fc016a4a969bdd208f801a851cb46b71ca17a
|
7
|
+
data.tar.gz: fe44090e65b67525eb9ae2b2456a661307cce75b4c81ac701353d785e30fccc22df9554e03d4107796a1c78fc582d726ee59a341c4383446cf1f43e04983b921
|
@@ -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)
|
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
|