effective_test_bot 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2852b7693749316a80bbf51edb8de937cc7313b5
|
4
|
+
data.tar.gz: 0f05cacd3f26e5a6391df2e9736985153157b051
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ce875ce8c9818c7ca3724703225a6c562b24f52a84f1dd7d10391af4af7747ad26a4af544458aaaa33b51f45eb2d02a3c3790f50dce11329e62bfdc51bedf40
|
7
|
+
data.tar.gz: 667b7188990f37b323026494e1ae9ec74b4885d7a9c9b3d4c79716cfe001bfd3ee99d0bddf2c2328d71386ca170003d06efa67aae27a9ae714d9e4e694431db7
|
@@ -222,4 +222,10 @@ module EffectiveTestBotAssertions
|
|
222
222
|
assert false, message || "(assert_email) Expected email with #{expected} to have been delivered"
|
223
223
|
end
|
224
224
|
|
225
|
+
def assert_access_denied(message = nil)
|
226
|
+
assert_equal 403, response_code, message || "Expected response code 403 when access denied, but it was: #{response_code || 'nil'}"
|
227
|
+
assert_content 'Access Denied'
|
228
|
+
assert_no_exceptions
|
229
|
+
end
|
230
|
+
|
225
231
|
end
|
@@ -75,17 +75,17 @@ module EffectiveTestBotTestHelper
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def flash(key = nil)
|
78
|
-
flash = page.evaluate_script('window.effective_test_bot.flash')
|
78
|
+
flash = (page.evaluate_script('window.effective_test_bot.flash') rescue nil) || {}
|
79
79
|
key ? flash[key.to_s] : flash
|
80
80
|
end
|
81
81
|
|
82
82
|
def assigns(key = nil)
|
83
|
-
assigns = page.evaluate_script('window.effective_test_bot.assigns')
|
83
|
+
assigns = (page.evaluate_script('window.effective_test_bot.assigns') rescue nil) || {}
|
84
84
|
key ? assigns[key.to_s] : assigns
|
85
85
|
end
|
86
86
|
|
87
87
|
def access_denied_exception
|
88
|
-
return nil unless page.evaluate_script('window.effective_test_bot.access_denied').present?
|
88
|
+
return nil unless (page.evaluate_script('window.effective_test_bot.access_denied') rescue nil).present?
|
89
89
|
|
90
90
|
{
|
91
91
|
exception: page.evaluate_script('window.effective_test_bot.access_denied'),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_test_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|