comparison test/unit/helpers/application_helper_test.rb @ 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
comparison
equal deleted inserted replaced
4:9cc62779c13a 14:1d32c0a0efbf
595 user = User.anonymous 595 user = User.anonymous
596 assert user.anonymous? 596 assert user.anonymous?
597 t = link_to_user(user) 597 t = link_to_user(user)
598 assert_equal ::I18n.t(:label_user_anonymous), t 598 assert_equal ::I18n.t(:label_user_anonymous), t
599 end 599 end
600
601 def test_link_to_project
602 project = Project.find(1)
603 assert_equal %(<a href="/projects/ecookbook">eCookbook</a>),
604 link_to_project(project)
605 assert_equal %(<a href="/projects/ecookbook/settings">eCookbook</a>),
606 link_to_project(project, :action => 'settings')
607 assert_equal %(<a href="http://test.host/projects/ecookbook?jump=blah">eCookbook</a>),
608 link_to_project(project, {:only_path => false, :jump => 'blah'})
609 assert_equal %(<a href="/projects/ecookbook/settings" class="project">eCookbook</a>),
610 link_to_project(project, {:action => 'settings'}, :class => "project")
611 end
600 end 612 end