From d91405a415819a626427373437e0929b19914cf4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 22 Dec 2004 22:50:44 +0000 Subject: Fixed UrlHelper#link_to_unless so it doesn't care if the id is a string or fixnum [zenspider] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/url_helper_test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionpack/test') diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 61b642a19e..9de510d0a4 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -43,6 +43,9 @@ class UrlHelperTest < Test::Unit::TestCase @params = { "controller" => "weblog", "action" => "show"} assert_equal "Showing", link_to_unless_current("Showing", :action => "show", :controller => "weblog") assert "Listing", link_to_unless_current("Listing", :action => "list", :controller => "weblog") + + @params = { "controller" => "weblog", "action" => "show", "id" => "1"} + assert_equal "Showing", link_to_unless_current("Showing", :action => "show", :controller => "weblog", :id => 1) end def test_mail_to @@ -58,4 +61,4 @@ class UrlHelperTest < Test::Unit::TestCase assert "Hello", link_to("Hello", {:action => 'myaction'}, nil) end -end \ No newline at end of file +end -- cgit v1.2.3