null+****@clear*****
null+****@clear*****
2011年 2月 20日 (日) 23:01:22 JST
Kouhei Sutou 2011-02-20 14:01:22 +0000 (Sun, 20 Feb 2011)
New Revision: f14c7f0bbdb2f552cb63c1a455f324852da008b7
Log:
add a test for JSONP support.
Modified files:
test/unit/http/test-http.rb
Modified: test/unit/http/test-http.rb (+6 -0)
===================================================================
--- test/unit/http/test-http.rb 2011-02-18 10:52:40 +0000 (d9fb523)
+++ test/unit/http/test-http.rb 2011-02-20 14:01:22 +0000 (5ea5a0b)
@@ -63,4 +63,10 @@ class HTTPTest < Test::Unit::TestCase
get(command_path(:shutdown))
end
end
+
+ def test_jsonp
+ response = get(command_path(:status, :callback => "func"))
+ assert_equal("application/json", response.content_type)
+ assert_match(/\Afunc\(.+\);\z/, response.body)
+ end
end