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:
Benjamin Fleischer 2016-12-23 11:24:23 -06:00 committed by GitHub
commit 3f46846891

View File

@ -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