Skip to content

Commit

Permalink
add stub request
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusbv committed Nov 4, 2024
1 parent d5056a2 commit 80fac36
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@

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

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_raise('Custom plugin error')
Expand Down

0 comments on commit 80fac36

Please sign in to comment.