Skip to content

Commit

Permalink
Testing Webmock
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusbv committed Nov 5, 2024
1 parent 736ed56 commit 29d7f5c
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,7 @@

context 'when verification provider returns false' do
before do
stub_request(:post, scc_activate_url)
.to_return(
status: 422,
body: { error: 'Unexpected instance verification error has occurred' }.to_json,
headers: {}
)

WebMock.allow_net_connect!
expect(InstanceVerification::Providers::Example).to receive(:new)
.with(be_a(ActiveSupport::Logger), be_a(ActionDispatch::Request), payload, instance_data).and_return(plugin_double)
expect(plugin_double).to receive(:instance_valid?).and_return(false)
Expand Down

0 comments on commit 29d7f5c

Please sign in to comment.