diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-02-14 09:59:16 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-02-14 09:59:16 -0800 |
commit | 9d023c87de98f8c85574ecec019dd30a3dfc6f03 (patch) | |
tree | f6d089fb4685354bfc46cc088c252514c78f6958 /actionpack/test | |
parent | cdbd64d1a3afd5a08c393403da61d8c7c1ae6c72 (diff) | |
parent | 19e9e67f95aa2f173e73ba11b22370c31b922103 (diff) | |
download | rails-9d023c87de98f8c85574ecec019dd30a3dfc6f03.tar.gz rails-9d023c87de98f8c85574ecec019dd30a3dfc6f03.tar.bz2 rails-9d023c87de98f8c85574ecec019dd30a3dfc6f03.zip |
Merge pull request #8704 from senny/remove_regexp_global_from_url_for
replace regexp global in #url_for
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 8a01b29340..91810864d5 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) |