aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-05-27 10:57:05 +0200
committerXavier Noria <fxn@hashref.com>2010-05-27 10:57:05 +0200
commitddec74fb3ab66528ca98ff37ca9b5f4227fdd2e3 (patch)
treec58ac9162487bdca68342fb2d30730ccfd926378 /actionpack/test/controller
parent96e2094b8b634e4af0d9d3c8a1db9bbb7023a4a7 (diff)
parente02db06ece7aeecec7c37f5b0e3de7d65c8684e6 (diff)
downloadrails-ddec74fb3ab66528ca98ff37ca9b5f4227fdd2e3.tar.gz
rails-ddec74fb3ab66528ca98ff37ca9b5f4227fdd2e3.tar.bz2
rails-ddec74fb3ab66528ca98ff37ca9b5f4227fdd2e3.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/mime_responds_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb
index c8ba8bcaf3..d654338dba 100644
--- a/actionpack/test/controller/mime_responds_test.rb
+++ b/actionpack/test/controller/mime_responds_test.rb
@@ -668,6 +668,19 @@ class RespondWithControllerTest < ActionController::TestCase
end
end
+ def test_using_resource_for_put_with_html_rerender_on_failure_even_on_method_override
+ with_test_route_set do
+ errors = { :name => :invalid }
+ Customer.any_instance.stubs(:errors).returns(errors)
+ @request.env["rack.methodoverride.original_method"] = "POST"
+ put :using_resource
+ assert_equal "text/html", @response.content_type
+ assert_equal 200, @response.status
+ assert_equal "Edit world!\n", @response.body
+ assert_nil @response.location
+ end
+ end
+
def test_using_resource_for_put_with_xml_yields_ok_on_success
@request.accept = "application/xml"
put :using_resource