Accept matching any HTTP status in json UAT helper
This commit is contained in:
parent
223a6e7a85
commit
4f11cc63e2
@ -49,7 +49,7 @@ describe 'API playlists' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'returns errors' do
|
it 'returns errors' do
|
||||||
expect(json 422).to match(
|
expect(json :any).to match(
|
||||||
name: [an_instance_of(String)]
|
name: [an_instance_of(String)]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -85,7 +85,7 @@ describe 'API playlists' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'returns errors' do
|
it 'returns errors' do
|
||||||
expect(json 422).to match(
|
expect(json :any).to match(
|
||||||
name: [an_instance_of(String)]
|
name: [an_instance_of(String)]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -41,7 +41,7 @@ module AcceptanceHelpers
|
|||||||
end
|
end
|
||||||
|
|
||||||
def json status = :success
|
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)
|
JSON.parse(response.body, symbolize_names: true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user