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

View File

@@ -115,7 +115,8 @@ module ActiveModelSerializers
end end
def test_that_raises_with_a_invalid_json_body 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 get :invalid_json_body
@@ -123,7 +124,7 @@ module ActiveModelSerializers
assert_response_schema('custom/show.json') assert_response_schema('custom/show.json')
end end
assert_equal(message, error.message) assert_match(message, error.message)
end end
end end
end end