Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions spec/services/inherited_proofing/va/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,25 @@
let(:auth_code) { 'mocked-auth-code-for-testing' }

it 'makes an authenticated request' do
stub = stub_request(:get, request_uri).
with(headers: request_headers).
to_return(status: 200, body: '{}', headers: {})
freeze_time do
stub = stub_request(:get, request_uri).
with(headers: request_headers).
to_return(status: 200, body: '{}', headers: {})

service.execute
service.execute
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That space supposed to be there? I can’t tell I’m doing this on my phone.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I think it's from the indent within the freeze_time block


expect(stub).to have_been_requested.once
expect(stub).to have_been_requested.once
end
end

it 'decrypts the response' do
stub_request(:get, request_uri).
with(headers: request_headers).
to_return(status: 200, body: encrypted_user_attributes, headers: {})
freeze_time do
stub_request(:get, request_uri).
with(headers: request_headers).
to_return(status: 200, body: encrypted_user_attributes, headers: {})

expect(service.execute).to eq user_attributes
expect(service.execute).to eq user_attributes
end
end
end

Expand Down