diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/template/prototype_helper_test.rb | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 9ab0f28f6b..b359750d16 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -479,10 +479,12 @@ class ActionPackHeaderTest < Test::Unit::TestCase @controller = ActionPackAssertionsController.new @request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new end + def test_rendering_xml_sets_content_type process :hello_xml_world - assert_equal('text/xml', @controller.headers['Content-Type']) + assert_equal('application/xml', @controller.headers['Content-Type']) end + def test_rendering_xml_respects_content_type @response.headers['Content-Type'] = 'application/pdf' process :hello_xml_world diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index 61cda1158d..253a8bac1c 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -380,4 +380,9 @@ return array.reverse(); }); EOS end + + def test_class_proxy + @generator.form.focus('my_field') + assert_equal "Form.focus(\"my_field\");", @generator.to_s + end end
\ No newline at end of file |