File tree 1 file changed +1
-7
lines changed
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 74
74
end
75
75
76
76
context 'when reCAPTCHA is enabled' do
77
- def fail_recaptcha
78
- # Without this, `verify_recaptcha` arbitrarily returns true in test env
79
- Recaptcha . configuration . skip_verify_env . delete ( 'test' )
80
- end
81
-
82
77
before do
83
78
stub_application_setting ( recaptcha_enabled : true )
84
79
end
@@ -91,7 +86,7 @@ def fail_recaptcha
91
86
end
92
87
93
88
it 'displays an error when the reCAPTCHA is not solved' do
94
- fail_recaptcha
89
+ allow_any_instance_of ( described_class ) . to receive ( :verify_recaptcha ) . and_return ( false )
95
90
96
91
post ( :create , params : user_params )
97
92
@@ -107,7 +102,6 @@ def fail_recaptcha
107
102
108
103
it 'does not require reCAPTCHA if disabled by feature flag' do
109
104
stub_feature_flags ( registrations_recaptcha : false )
110
- fail_recaptcha
111
105
112
106
post ( :create , params : user_params )
113
107
You can’t perform that action at this time.
0 commit comments