aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/integration_test.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2013-07-16 13:27:22 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2013-07-16 13:39:17 +0100
commit1555a1800ea550a991eb57ce1ec8236bdba0365a (patch)
tree06bcffbd8a656373ffd57713fabec8a00ab7ba1c /actionpack/test/controller/integration_test.rb
parentc238a6cc7ce69f200db72c4cb3c67bd47cea7d7c (diff)
downloadrails-1555a1800ea550a991eb57ce1ec8236bdba0365a.tar.gz
rails-1555a1800ea550a991eb57ce1ec8236bdba0365a.tar.bz2
rails-1555a1800ea550a991eb57ce1ec8236bdba0365a.zip
Skip Rack applications and redirects when generating urls
When generating an unnamed url (i.e. using `url_for` with an options hash) we should skip anything other than standard Rails routes otherwise it will match the first mounted application or redirect and generate a url with query parameters rather than raising an error if the options hash doesn't match any defined routes. Fixes #8018
Diffstat (limited to 'actionpack/test/controller/integration_test.rb')
-rw-r--r--actionpack/test/controller/integration_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index f7ec6d71b3..e851cc6a63 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -277,7 +277,7 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest
end
def redirect
- redirect_to :action => "get"
+ redirect_to action_url('get')
end
end
@@ -511,8 +511,8 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest
end
set.draw do
- match ':action', :to => controller, :via => [:get, :post]
- get 'get/:action', :to => controller
+ match ':action', :to => controller, :via => [:get, :post], :as => :action
+ get 'get/:action', :to => controller, :as => :get_action
end
self.singleton_class.send(:include, set.url_helpers)