aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-01-02 21:37:56 +0100
committerYves Senn <yves.senn@garaio.com>2013-01-16 18:51:12 +0100
commit19e9e67f95aa2f173e73ba11b22370c31b922103 (patch)
tree31db89317b13f53668f1db47929512050f3b2b40 /actionpack/test
parent555cb0afb5a8a8e98fc982edb9e09dfaafd46380 (diff)
downloadrails-19e9e67f95aa2f173e73ba11b22370c31b922103.tar.gz
rails-19e9e67f95aa2f173e73ba11b22370c31b922103.tar.bz2
rails-19e9e67f95aa2f173e73ba11b22370c31b922103.zip
replace regexp global in #url_for
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/request_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb
index 39923d0d2b..cbb086f605 100644
--- a/actionpack/test/dispatch/request_test.rb
+++ b/actionpack/test/dispatch/request_test.rb
@@ -13,6 +13,9 @@ class RequestTest < ActiveSupport::TestCase
assert_equal '/books', url_for(:only_path => true, :path => '/books')
+ assert_equal 'http://www.example.com/books/?q=code', url_for(trailing_slash: true, path: '/books?q=code')
+ assert_equal 'http://www.example.com/books/?spareslashes=////', url_for(trailing_slash: true, path: '/books?spareslashes=////')
+
assert_equal 'http://www.example.com', url_for
assert_equal 'http://api.example.com', url_for(:subdomain => 'api')
assert_equal 'http://example.com', url_for(:subdomain => false)