aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/routing_test.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index e8da790e50..700666600b 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)
@@ -2405,12 +2413,10 @@ end
class TestTildeAndMinusPaths < ActionDispatch::IntegrationTest
Routes = ActionDispatch::Routing::RouteSet.new.tap do |app|
app.draw do
- match "/~user" => lambda { |env|
- [200, { 'Content-Type' => 'text/plain' }, []]
- }, :as => :tilde_path
- match "/young-and-fine" => lambda { |env|
- [200, { 'Content-Type' => 'text/plain' }, []]
- }, :as => :tilde_path
+ ok = lambda { |env| [200, { 'Content-Type' => 'text/plain' }, []] }
+
+ match "/~user" => ok
+ match "/young-and-fine" => ok
end
end