summaryrefslogtreecommitdiffstats
path: root/test
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
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')
-rw-r--r--test/functional/issues_controller_test.rb2
-rw-r--r--test/unit/helpers/projects_helper_test.rb11
2 files changed, 10 insertions, 3 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 9f3542e01..77f2ed5a8 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -816,7 +816,7 @@ class IssuesControllerTest < ActionController::TestCase
def test_index_with_fixed_version_column
get :index, :set_filter => 1, :c => %w(fixed_version)
assert_select 'table.issues td.fixed_version' do
- assert_select 'a[href=?]', '/versions/2', :text => '1.0'
+ assert_select 'a[href=?]', '/versions/2', :text => 'eCookbook - 1.0'
end
end
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