Skip to content

Commit

Permalink
Add expectation to see the response.body from failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwr18 committed Oct 18, 2023
1 parent 21ae031 commit a83c837
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/requests/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
it 'returns not authorized' do
subject.call

expect(response.body).to eq('What is happening, why a 500 when the tests pass locally?')
expect(response).to have_http_status(:unauthorized)
expect(response.code.to_i).to eq(401)
end
Expand Down Expand Up @@ -102,6 +103,7 @@
it 'returns not authorized' do
subject.call

expect(response.body).to eq('What is happening, why a 500 when the tests pass locally?')
expect(response).to have_http_status(:unauthorized)
expect(response.code.to_i).to eq(401)
end
Expand Down Expand Up @@ -170,6 +172,7 @@
it 'returns not authorized' do
subject.call

expect(response.body).to eq('What is happening, why a 500 when the tests pass locally?')
expect(response).to have_http_status(:unauthorized)
expect(response.code.to_i).to eq(401)
end
Expand Down Expand Up @@ -227,6 +230,7 @@
it 'returns not authorized' do
subject.call

expect(response.body).to eq('What is happening, why a 500 when the tests pass locally?')
expect(response).to have_http_status(:unauthorized)
expect(response.code.to_i).to eq(401)
end
Expand Down

0 comments on commit a83c837

Please sign in to comment.