提交 1d8be7bc 编写于 作者: J Josh Kalderimis

AS Json parse_error makes a return for backwards compatibility, although it...

AS Json parse_error makes a return for backwards compatibility, although it will return MultiJson::DecodeError
上级 e019587e
......@@ -34,6 +34,10 @@ def with_backend(name)
self.backend = old_backend
end
def parse_error
MultiJson::DecodeError
end
private
def convert_dates_from(data)
......
......@@ -82,7 +82,7 @@ class TestJSONDecoding < ActiveSupport::TestCase
end
def test_failed_json_decoding
assert_raise(MultiJson::DecodeError) { ActiveSupport::JSON.decode(%({: 1})) }
assert_raise(ActiveSupport::JSON.parse_error) { ActiveSupport::JSON.decode(%({: 1})) }
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册