aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorDamien Mathieu <42@dmathieu.com>2011-07-02 18:02:43 +0200
committerDamien Mathieu <42@dmathieu.com>2011-07-02 18:53:54 +0200
commitac15bcebf2d560a34286ffba7ed6a687574f2d9d (patch)
tree1031021cbc569ce800c99a0d33edc5eaef00be2e /actionpack/test/controller
parent908be47781de892779639d5ae83b3471d46e6e48 (diff)
downloadrails-ac15bcebf2d560a34286ffba7ed6a687574f2d9d.tar.gz
rails-ac15bcebf2d560a34286ffba7ed6a687574f2d9d.tar.bz2
rails-ac15bcebf2d560a34286ffba7ed6a687574f2d9d.zip
provide a more explicit message when using url_for with nil
This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/mime_responds_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb
index 288682aa07..afb2d39955 100644
--- a/actionpack/test/controller/mime_responds_test.rb
+++ b/actionpack/test/controller/mime_responds_test.rb
@@ -659,6 +659,13 @@ class RespondWithControllerTest < ActionController::TestCase
assert_equal %Q[{"result":{"name":"david","id":13}}], @response.body
end
+ def test_using_hash_resource_with_post
+ @request.accept = "application/json"
+ assert_raise ArgumentError, "Nil location provided. Can't build URI." do
+ post :using_hash_resource
+ end
+ end
+
def test_using_resource_with_block
@request.accept = "*/*"
get :using_resource_with_block