Mercurial > hg > soundsoftware-site
diff test/unit/helpers/.svn/text-base/application_helper_test.rb.svn-base @ 14:1d32c0a0efbf
* Update to SVN trunk (revisions 3892-4040)
author | Chris Cannam |
---|---|
date | Wed, 25 Aug 2010 16:30:24 +0100 |
parents | 513646585e45 |
children | 40f7cfd4df19 |
line wrap: on
line diff
--- a/test/unit/helpers/.svn/text-base/application_helper_test.rb.svn-base Wed Jul 28 12:47:17 2010 +0100 +++ b/test/unit/helpers/.svn/text-base/application_helper_test.rb.svn-base Wed Aug 25 16:30:24 2010 +0100 @@ -597,4 +597,16 @@ 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 %(<a href="/projects/ecookbook">eCookbook</a>), + link_to_project(project) + assert_equal %(<a href="/projects/ecookbook/settings">eCookbook</a>), + link_to_project(project, :action => 'settings') + assert_equal %(<a href="http://test.host/projects/ecookbook?jump=blah">eCookbook</a>), + link_to_project(project, {:only_path => false, :jump => 'blah'}) + assert_equal %(<a href="/projects/ecookbook/settings" class="project">eCookbook</a>), + link_to_project(project, {:action => 'settings'}, :class => "project") + end end