You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebMock::NetConnectNotAllowedError:
Real HTTP connections are disabled. Unregistered request: GET https://www.google.com/recaptcha/api/siteverify?response=&secret=6LfHB7kUAAAAAHTFLRZDh6o23ICu86HbLUXB_Ric with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Host'=>'www.google.com', 'User-Agent'=>'Ruby'}
You can stub this request with the following snippet:
stub_request(:get, "https://www.google.com/recaptcha/api/siteverify?response=&secret=6LfHB7kUAAAAAHTFLRZDh6o23ICu86HbLUXB_Ric").
with(headers: {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Host'=>'www.google.com', 'User-Agent'=>'Ruby'}).
to_return(status: 200, body: "", headers: {})
How to add this in rails_helper.rb
module NewGoogleRecaptcha
def self.human?(*attrs)
true
end
end
The text was updated successfully, but these errors were encountered:
error:
How to add this in rails_helper.rb
The text was updated successfully, but these errors were encountered: