From 0714ced81572a1501d37bc866855a7f339c3bf03 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 20 Jun 2019 07:11:26 +0000 Subject: Add time entries tab to issue history tabs (#3058). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18274 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/issues_controller_test.rb | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 517d7ce01..f625c6e8b 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -2537,12 +2537,12 @@ class IssuesControllerTest < Redmine::ControllerTest def test_show_display_changesets_tab_for_issue_with_changesets project = Project.find(2) - issue = Issue.find(3) + issue = Issue.find(9) issue.changeset_ids = [102] issue.save! @request.session[:user_id] = 2 - get :show, :params => {:id => 3} + get :show, :params => {:id => issue.id} assert_select '#history' do assert_select 'div.tabs ul a', 1 @@ -2550,6 +2550,24 @@ class IssuesControllerTest < Redmine::ControllerTest end end + def test_show_should_display_spent_time_tab_for_issue_with_time_entries + @request.session[:user_id] = 1 + get :show, :params => {:id => 3} + assert_response :success + + assert_select '#history' do + assert_select 'div.tabs ul a', 1 + assert_select 'div.tabs a[id=?]', 'tab-time_entries', :text => 'Spent time' + end + + assert_select 'div[id=?]', 'time-entry-3' do + assert_select 'a[title=?][href=?]', 'Edit', '/time_entries/3/edit' + assert_select 'a[title=?][href=?]', 'Delete', '/time_entries/3' + + assert_select 'ul[class=?]', 'details', :text => /1.00 h/ + end + end + def test_get_new @request.session[:user_id] = 2 get :new, :params => { -- cgit v1.2.3