Improve "normal" controller tests
This commit is contained in:
parent
79bafec693
commit
4449314cf6
|
|
@ -100,7 +100,12 @@ 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)
|
||||||
|
expect(json[:name]).to eq(@tournament.name)
|
||||||
|
expect(json[:description]).to eq(@tournament.description)
|
||||||
|
expect(json[:public]).to eq(@tournament.public)
|
||||||
|
expect(json[:teams_advancing_from_group_stage]).to eq([])
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with simple=true parameter' do
|
context 'with simple=true parameter' do
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue