From ad973ab8a0cb268984533f9f61bf1b463d47a066 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 25 Nov 2014 10:29:48 -0200 Subject: Add regression test case to ensure script_name as nil is not used anymore in url_for --- actionpack/test/controller/url_for_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3