aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/json
diff options
context:
space:
mode:
authorDiego Carrion <dc.rec1@gmail.com>2011-03-09 21:45:45 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-03-22 21:09:54 -0300
commita1edbf720620c672566a1681572c3845452ca51a (patch)
tree9094a71a38d890a0514d88e9add9b522855a3e10 /activesupport/test/json
parent7004434ad85901215e1cb4367b2b8b1e7f9063c7 (diff)
downloadrails-a1edbf720620c672566a1681572c3845452ca51a.tar.gz
rails-a1edbf720620c672566a1681572c3845452ca51a.tar.bz2
rails-a1edbf720620c672566a1681572c3845452ca51a.zip
parse dates to yaml in json arrays
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activesupport/test/json')
-rw-r--r--activesupport/test/json/decoding_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/json/decoding_test.rb b/activesupport/test/json/decoding_test.rb
index 6b890c7d46..88cf97de7e 100644
--- a/activesupport/test/json/decoding_test.rb
+++ b/activesupport/test/json/decoding_test.rb
@@ -17,6 +17,8 @@ class TestJSONDecoding < ActiveSupport::TestCase
%({"matzue": "松江", "asakusa": "浅草"}) => {"matzue" => "松江", "asakusa" => "浅草"},
%({"a": "2007-01-01"}) => {'a' => Date.new(2007, 1, 1)},
%({"a": "2007-01-01 01:12:34 Z"}) => {'a' => Time.utc(2007, 1, 1, 1, 12, 34)},
+ %(["2007-01-01 01:12:34 Z"]) => [Time.utc(2007, 1, 1, 1, 12, 34)],
+ %(["2007-01-01 01:12:34 Z", "2007-01-01 01:12:35 Z"]) => [Time.utc(2007, 1, 1, 1, 12, 34), Time.utc(2007, 1, 1, 1, 12, 35)],
# no time zone
%({"a": "2007-01-01 01:12:34"}) => {'a' => "2007-01-01 01:12:34"},
# invalid date