Test timer_end is in show tournament
This commit is contained in:
parent
f7dc8411f4
commit
9f1807ab4b
|
|
@ -100,7 +100,11 @@ RSpec.describe TournamentsController, type: :controller do
|
||||||
|
|
||||||
it 'returns the requested tournament' do
|
it 'returns the requested tournament' do
|
||||||
get :show, params: { id: @tournament.to_param }
|
get :show, params: { id: @tournament.to_param }
|
||||||
expect(deserialize_response(response)[:id].to_i).to eq(@tournament.id)
|
json = deserialize_response(response)
|
||||||
|
expect(json[:id].to_i).to eq(@tournament.id)
|
||||||
|
expected_keys = %i[id name code public description playoff_teams_amount instant_finalists_amount intermediate_round_participants_amount timer_end owner_username stages teams]
|
||||||
|
expect(json.keys).to match_array(expected_keys)
|
||||||
|
expect(json).to eq(TournamentSerializer.new(@tournament).as_json)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with simple=true parameter' do
|
context 'with simple=true parameter' do
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue