Merged r3924 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3974 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-08-19 04:32:06 +00:00
parent 18d841553e
commit c7e719fc4b
11 changed files with 42 additions and 15 deletions
@@ -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 %(<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