aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-02-24 16:25:41 -0800
committerXavier Noria <fxn@hashref.com>2012-02-24 16:25:41 -0800
commitb7a094536de6fdeb428aa79d21f1e2128169f45e (patch)
treeec0af33cb15a1c70a3f3e71b954782068a2040dd /actionpack/test/dispatch/routing_test.rb
parent31ceb5e67b164eb98cddd5aef0bc87dad606a6bf (diff)
downloadrails-b7a094536de6fdeb428aa79d21f1e2128169f45e.tar.gz
rails-b7a094536de6fdeb428aa79d21f1e2128169f45e.tar.bz2
rails-b7a094536de6fdeb428aa79d21f1e2128169f45e.zip
uses PATCH for the forms of persisted records, and routes PATCH and PUT to the update action of resources
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index e8da790e50..eb495d30e5 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -1026,6 +1026,10 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal 'pasts#destroy', @response.body
assert_equal '/past', past_path
+ patch '/present'
+ assert_equal 'presents#update', @response.body
+ assert_equal '/present', present_path
+
put '/present'
assert_equal 'presents#update', @response.body
assert_equal '/present', present_path
@@ -1044,6 +1048,10 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal 'relationships#destroy', @response.body
assert_equal '/relationships/1', relationship_path(1)
+ patch '/friendships/1'
+ assert_equal 'friendships#update', @response.body
+ assert_equal '/friendships/1', friendship_path(1)
+
put '/friendships/1'
assert_equal 'friendships#update', @response.body
assert_equal '/friendships/1', friendship_path(1)