diff --git a/spec/integration/api/application_spec.rb b/spec/integration/api/application_spec.rb index 209ef78..5db1d4f 100644 --- a/spec/integration/api/application_spec.rb +++ b/spec/integration/api/application_spec.rb @@ -12,7 +12,7 @@ describe 'API application' do it 'responds with a 406 when request format is not JSON' do get api_ping_path, format: :xml - expect(response.status).to be 406 + expect(response).to have_http_status 406 expect(response.content_type).to eq :json expect(response.body).to be_empty end @@ -23,13 +23,13 @@ describe 'API application' do it 'responds with a 404 when route does not exist' do get '/api/not_found', format: :json - expect(response.status).to be 404 + expect(response).to have_http_status 404 expect(response.body).to be_empty end it 'responds with a 404 when a resource (AR) was not found' do get api_playlist_path(id: 1), format: :json - expect(response.status).to be 404 + expect(response).to have_http_status 404 expect(response.body).to be_empty end end