Actually test if correct field gets set in error response
This commit is contained in:
parent
c8f69ccb16
commit
63db00b9ff
|
|
@ -201,7 +201,7 @@ RSpec.describe TournamentsController, type: :controller do
|
||||||
expect(response).to have_http_status(:unprocessable_entity)
|
expect(response).to have_http_status(:unprocessable_entity)
|
||||||
end
|
end
|
||||||
it 'returns the correct error message' do
|
it 'returns the correct error message' do
|
||||||
expect(deserialize_response(response).values.first.first)
|
expect(deserialize_response(response)[:playoff_teams_amount].first)
|
||||||
.to eq('playoff_teams_amount needs to be a positive power of two')
|
.to eq('playoff_teams_amount needs to be a positive power of two')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue