diff options
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/core_ext/time_with_zone_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index 3a12100e86..d88f79ae4f 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -56,8 +56,11 @@ class TimeWithZoneTest < Test::Unit::TestCase assert_equal 'EDT', ActiveSupport::TimeWithZone.new(Time.utc(2000, 6), @time_zone).zone #dst end - def test_to_json + def test_to_json_with_use_standard_json_time_format_config_set_to_false + old, ActiveSupport.use_standard_json_time_format = ActiveSupport.use_standard_json_time_format, false assert_equal "\"1999/12/31 19:00:00 -0500\"", ActiveSupport::JSON.encode(@twz) + ensure + ActiveSupport.use_standard_json_time_format = old end def test_to_json_with_use_standard_json_time_format_config_set_to_true |