From e1917cab3249e7341160bce66f90b5ec52e14733 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 9 Dec 2004 23:18:25 +0000 Subject: Added link_to_image(src, options = {}, html_options = {}, *parameters_for_method_reference) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@105 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/url_helper_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index 198b26b113..e624c188db 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -27,6 +27,18 @@ class UrlHelperTest < Test::Unit::TestCase ) end + def test_link_to_image + assert_equal( + "\"Rss\"", + link_to_image("rss", "http://www.world.com", "size" => "30x45") + ) + + assert_equal( + "\"Feed\"", + link_to_image("rss.gif", "http://www.world.com", "size" => "30x45", "alt" => "Feed", "class" => "admin") + ) + end + def test_link_unless_current @params = { "controller" => "weblog", "action" => "show"} assert_equal "Showing", link_to_unless_current("Showing", :action => "show", :controller => "weblog") -- cgit v1.2.3