summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-14 11:03:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-14 11:03:44 +0000
commit579d687580b20a8c2dffdfc60a2d86bc77be486c (patch)
tree4501c6f62f6026ad2a6b19410b63631e03b30201 /test/unit
parent8d982736e03595739235b0da123a105c43fdaf75 (diff)
downloadredmine-579d687580b20a8c2dffdfc60a2d86bc77be486c.tar.gz
redmine-579d687580b20a8c2dffdfc60a2d86bc77be486c.zip
Adds version date as title in #link_to_version (#17431).
git-svn-id: http://svn.redmine.org/redmine/trunk@13324 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/helpers/projects_helper_test.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb
index 20f4283fe..a11cc6d9e 100644
--- a/test/unit/helpers/projects_helper_test.rb
+++ b/test/unit/helpers/projects_helper_test.rb
@@ -42,12 +42,19 @@ 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">Alpha</a>', link_to_version(Version.find(5))
+ assert_equal '<a href="/versions/5" title="07/01/2006">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">OnlineStore - Alpha</a>', link_to_version(Version.find(5))
+ assert_equal '<a href="/versions/5" title="07/01/2006">OnlineStore - 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">OnlineStore - Alpha</a>', link_to_version(version)
end
def test_link_to_private_version