mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
test nested hash with float
[#652 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
parent
cb45ee344d
commit
0d4dbb3dfa
1 changed files with 12 additions and 0 deletions
|
@ -100,6 +100,18 @@ class TestJSONEncoding < Test::Unit::TestCase
|
||||||
ActiveSupport.use_standard_json_time_format = false
|
ActiveSupport.use_standard_json_time_format = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_nested_hash_with_float
|
||||||
|
assert_nothing_raised do
|
||||||
|
hash = {
|
||||||
|
"CHI" => {
|
||||||
|
:dislay_name => "chicago",
|
||||||
|
:latitude => 123.234
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = hash.to_json
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def object_keys(json_object)
|
def object_keys(json_object)
|
||||||
|
|
Loading…
Reference in a new issue