aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-09-30 20:57:50 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-09-30 20:57:50 +0000
commit7275d2749cb829d89bffe7e6aa87c99084351f6a (patch)
treeea1ffa76f30699cb84827bf6d21dbdb6d1201c1e /actionpack
parent66d05f5e2c7ac6b18220956fbcf34efcd32638fc (diff)
downloadrails-7275d2749cb829d89bffe7e6aa87c99084351f6a.tar.gz
rails-7275d2749cb829d89bffe7e6aa87c99084351f6a.tar.bz2
rails-7275d2749cb829d89bffe7e6aa87c99084351f6a.zip
Fixed JSON encoding to use quoted keys according to the JSON standard (closes #8762) [choonkat/chuyeow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/render_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 3b755eb6a6..23c9613cad 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -209,19 +209,19 @@ class RenderTest < Test::Unit::TestCase
def test_do_with_render_json
get :render_json_hello_world
- assert_equal '{hello: "world"}', @response.body
+ assert_equal '{"hello": "world"}', @response.body
assert_equal 'application/json', @response.content_type
end
def test_do_with_render_json_with_callback
get :render_json_hello_world_with_callback
- assert_equal 'alert({hello: "world"})', @response.body
+ assert_equal 'alert({"hello": "world"})', @response.body
assert_equal 'application/json', @response.content_type
end
def test_do_with_render_symbol_json
get :render_symbol_json
- assert_equal '{hello: "world"}', @response.body
+ assert_equal '{"hello": "world"}', @response.body
assert_equal 'application/json', @response.content_type
end