aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2014-11-25 10:29:48 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2014-11-25 10:29:48 -0200
commitad973ab8a0cb268984533f9f61bf1b463d47a066 (patch)
tree42ce65685a9b7357a875cfe135e8060d4a7f30ca
parent1e5290a743f03a132fe82bf0c4631ee5a587c6a4 (diff)
downloadrails-ad973ab8a0cb268984533f9f61bf1b463d47a066.tar.gz
rails-ad973ab8a0cb268984533f9f61bf1b463d47a066.tar.bz2
rails-ad973ab8a0cb268984533f9f61bf1b463d47a066.zip
Add regression test case to ensure script_name as nil is not used anymore in url_for
-rw-r--r--actionpack/test/controller/url_for_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/url_for_test.rb b/actionpack/test/controller/url_for_test.rb
index f0eba17556..83302d880d 100644
--- a/actionpack/test/controller/url_for_test.rb
+++ b/actionpack/test/controller/url_for_test.rb
@@ -290,6 +290,13 @@ module AbstractController
end
end
+ def test_using_nil_script_name
+ add_host!
+ assert_equal('https://www.basecamphq.com/subdir/c/a/i',
+ W.new.url_for(:controller => 'c', :action => 'a', :id => 'i', :protocol => 'https', :script_name => nil, :original_script_name => '/subdir')
+ )
+ end
+
def test_only_path
with_routing do |set|
set.draw do