From 579d687580b20a8c2dffdfc60a2d86bc77be486c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 14 Jul 2014 11:03:44 +0000 Subject: 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 --- test/functional/issues_controller_test.rb | 2 +- test/unit/helpers/projects_helper_test.rb | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'test') 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 'Alpha', link_to_version(Version.find(5)) + assert_equal 'Alpha', link_to_version(Version.find(5)) end def test_link_to_version User.current = User.find(1) - assert_equal 'OnlineStore - Alpha', link_to_version(Version.find(5)) + assert_equal 'OnlineStore - Alpha', 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 'OnlineStore - Alpha', link_to_version(version) end def test_link_to_private_version -- cgit v1.2.3