summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-14 19:16:29 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-14 19:16:29 +0000
commit1da158edcffbb3db0ae88e781bcd4a412124f478 (patch)
tree59b41fc2d9eb63359d4734fd4b1bb76543215ef4 /test
parent9a80e118b96e3537392f1aad42505c4c1843519c (diff)
downloadredmine-1da158edcffbb3db0ae88e781bcd4a412124f478.tar.gz
redmine-1da158edcffbb3db0ae88e781bcd4a412124f478.zip
Use route helper in #link_to_project.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11184 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/helpers/application_helper_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index 4b5c896d7..c5b3aaadc 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -1075,6 +1075,17 @@ RAW
link_to_project(project, {:action => 'settings'}, :class => "project")
end
+ def test_link_to_project_settings
+ project = Project.find(1)
+ assert_equal '<a href="/projects/ecookbook/settings">eCookbook</a>', link_to_project_settings(project)
+
+ project.status = Project::STATUS_CLOSED
+ assert_equal '<a href="/projects/ecookbook">eCookbook</a>', link_to_project_settings(project)
+
+ project.status = Project::STATUS_ARCHIVED
+ assert_equal 'eCookbook', link_to_project_settings(project)
+ end
+
def test_link_to_legacy_project_with_numerical_identifier_should_use_id
# numeric identifier are no longer allowed
Project.update_all "identifier=25", "id=1"