diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
commit | 2d1866d966d94c688f9cb87c5bf3f096dffac844 (patch) | |
tree | 7a733c1cc51448ab69b3f892285305dbfb0ae15e /test/unit/helpers/projects_helper_test.rb | |
parent | a6ec78a4dc658e3517ed682792016b6530458696 (diff) | |
download | redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.tar.gz redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.zip |
Merged rails-4.1 branch (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/helpers/projects_helper_test.rb')
-rw-r--r-- | test/unit/helpers/projects_helper_test.rb | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb index b4db5d42f..20f4283fe 100644 --- a/test/unit/helpers/projects_helper_test.rb +++ b/test/unit/helpers/projects_helper_test.rb @@ -42,23 +42,16 @@ class ProjectsHelperTest < ActionView::TestCase def test_link_to_version_within_project @project = Project.find(2) User.current = User.find(1) - assert_equal '<a href="/versions/5" title="07/01/2006">Alpha</a>', link_to_version(Version.find(5)) + assert_equal '<a href="/versions/5">Alpha</a>', link_to_version(Version.find(5)) end def test_link_to_version User.current = User.find(1) - assert_equal '<a href="/versions/5" title="07/01/2006">Alpha</a>', link_to_version(Version.find(5)) - end - - def test_link_to_version_without_effective_date - User.current = User.find(1) - version = Version.find(5) - version.effective_date = nil - assert_equal '<a href="/versions/5">Alpha</a>', link_to_version(version) + assert_equal '<a href="/versions/5">OnlineStore - Alpha</a>', link_to_version(Version.find(5)) end def test_link_to_private_version - assert_equal 'Alpha', link_to_version(Version.find(5)) + assert_equal 'OnlineStore - Alpha', link_to_version(Version.find(5)) end def test_link_to_version_invalid_version @@ -71,20 +64,11 @@ class ProjectsHelperTest < ActionView::TestCase end def test_format_version_name - assert_equal "0.1", format_version_name(Version.find(1)) - end - - def test_format_version_name_for_shared_version_within_project_should_not_display_project_name - @project = Project.find(1) - version = Version.find(1) - version.sharing = 'system' - assert_equal "0.1", format_version_name(version) + assert_equal "eCookbook - 0.1", format_version_name(Version.find(1)) end - def test_format_version_name_for_shared_version_should_display_project_name - version = Version.find(1) - version.sharing = 'system' - assert_equal "eCookbook - 0.1", format_version_name(version) + def test_format_version_name_for_system_version + assert_equal "OnlineStore - Systemwide visible version", format_version_name(Version.find(7)) end def test_version_options_for_select_with_no_versions |