From 63db00b9ffca8adc7caa1dffe8fbe00e5e468d03 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Thu, 13 Jun 2019 13:28:34 +0200 Subject: [PATCH] Actually test if correct field gets set in error response --- spec/controllers/tournaments_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/tournaments_controller_spec.rb b/spec/controllers/tournaments_controller_spec.rb index 33e985b..06e05dc 100644 --- a/spec/controllers/tournaments_controller_spec.rb +++ b/spec/controllers/tournaments_controller_spec.rb @@ -201,7 +201,7 @@ RSpec.describe TournamentsController, type: :controller do expect(response).to have_http_status(:unprocessable_entity) end 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') end end