Fix warning about content/media type for Rails 6

This commit is contained in:
Thor77 2020-06-05 20:41:33 +02:00
parent 6196900ba8
commit bb4a950138
No known key found for this signature in database
GPG Key ID: 5051E71B46AA669A
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ RSpec.describe MatchesController, type: :controller do
it 'should return success' do
get :show, params: { id: @match.to_param }
expect(response).to be_successful
expect(response.content_type).to eq('application/json')
expect(response.media_type).to eq('application/json')
end
it 'should return the correct state' do

View File

@ -248,7 +248,7 @@ RSpec.describe TournamentsController, type: :controller do
it 'renders a JSON response with the new tournament' do
post :create, params: create_playoff_tournament_data
expect(response).to have_http_status(:created)
expect(response.content_type).to eq('application/json')
expect(response.media_type).to eq('application/json')
expect(response.location).to eq(tournament_url(Tournament.last))
end
end
@ -329,7 +329,7 @@ RSpec.describe TournamentsController, type: :controller do
it 'renders a JSON response with the tournament' do
put :update, params: { id: @tournament.to_param }.merge(valid_update)
expect(response).to have_http_status(:ok)
expect(response.content_type).to eq('application/json')
expect(response.media_type).to eq('application/json')
end
context 'any variable relevant for group stage to playoff transition changed' do