mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Merge pull request #2007 from bf4/check_ci
Test was failing due to change in JSON exception message when parsing empty string
This commit is contained in:
commit
3f46846891
@ -115,7 +115,8 @@ module ActiveModelSerializers
|
||||
end
|
||||
|
||||
def test_that_raises_with_a_invalid_json_body
|
||||
message = 'A JSON text must at least contain two octets!'
|
||||
# message changes from JSON gem 2.0.2 to 2.2.0
|
||||
message = /A JSON text must at least contain two octets!|an unexpected token at ''/
|
||||
|
||||
get :invalid_json_body
|
||||
|
||||
@ -123,7 +124,7 @@ module ActiveModelSerializers
|
||||
assert_response_schema('custom/show.json')
|
||||
end
|
||||
|
||||
assert_equal(message, error.message)
|
||||
assert_match(message, error.message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user