diff --git a/spec/integration/api/playlists_spec.rb b/spec/integration/api/playlists_spec.rb index 3ad78ac..2d7e6f9 100644 --- a/spec/integration/api/playlists_spec.rb +++ b/spec/integration/api/playlists_spec.rb @@ -49,7 +49,7 @@ describe 'API playlists' do end it 'returns errors' do - expect(json 422).to match( + expect(json :any).to match( name: [an_instance_of(String)] ) end @@ -85,7 +85,7 @@ describe 'API playlists' do end it 'returns errors' do - expect(json 422).to match( + expect(json :any).to match( name: [an_instance_of(String)] ) end diff --git a/spec/support/acceptance_helpers.rb b/spec/support/acceptance_helpers.rb index 5662225..2c63b76 100644 --- a/spec/support/acceptance_helpers.rb +++ b/spec/support/acceptance_helpers.rb @@ -41,7 +41,7 @@ module AcceptanceHelpers end def json status = :success - expect(response).to have_http_status status + expect(response).to have_http_status status unless status == :any JSON.parse(response.body, symbolize_names: true) end end