From a1b607480abc6649f9531b1fd8a7d20c3c656084 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Barth Date: Sun, 8 Aug 2010 07:07:20 +0000 Subject: Refactor: added link_to_project helper to handle links to projects git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3924 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/helpers/application_helper_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/unit/helpers') diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 90d342898..6fd21fe37 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -597,4 +597,16 @@ EXPECTED t = link_to_user(user) assert_equal ::I18n.t(:label_user_anonymous), t end + + def test_link_to_project + project = Project.find(1) + assert_equal %(eCookbook), + link_to_project(project) + assert_equal %(eCookbook), + link_to_project(project, :action => 'settings') + assert_equal %(eCookbook), + link_to_project(project, {:only_path => false, :jump => 'blah'}) + assert_equal %(eCookbook), + link_to_project(project, {:action => 'settings'}, :class => "project") + end end -- cgit v1.2.3