aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-12-02 17:47:29 -0800
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-12-02 17:47:29 -0800
commit6e905e21b1b3a8114d1499775061b65556c9964e (patch)
tree5a650266d1d58b5184f21cc32028b4b18c32e73a /activesupport/test
parent735abe93a5590f3d6f215a645e633d9fcd8ff3b6 (diff)
parentfadc02b7322c97f10d34fc04c147f3585eda1272 (diff)
downloadrails-6e905e21b1b3a8114d1499775061b65556c9964e.tar.gz
rails-6e905e21b1b3a8114d1499775061b65556c9964e.tar.bz2
rails-6e905e21b1b3a8114d1499775061b65556c9964e.zip
Merge pull request #13060 from chancancode/change_log_for_json_refactor
CHANGELOG for JSON refactor + added back the `encode_big_decimal_as_string` option with warning
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/json/encoding_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb
index 79e639b508..78cf4819f9 100644
--- a/activesupport/test/json/encoding_test.rb
+++ b/activesupport/test/json/encoding_test.rb
@@ -172,6 +172,22 @@ class TestJSONEncoding < ActiveSupport::TestCase
assert_equal "𐒑", decoded_hash['string']
end
+ def test_reading_encode_big_decimal_as_string_option
+ assert_deprecated do
+ assert ActiveSupport.encode_big_decimal_as_string
+ end
+ end
+
+ def test_setting_deprecated_encode_big_decimal_as_string_option
+ assert_raise(NotImplementedError) do
+ ActiveSupport.encode_big_decimal_as_string = true
+ end
+
+ assert_raise(NotImplementedError) do
+ ActiveSupport.encode_big_decimal_as_string = false
+ end
+ end
+
def test_exception_raised_when_encoding_circular_reference_in_array
a = [1]
a << a