diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-06-20 07:11:26 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-06-20 07:11:26 +0000 |
commit | 0714ced81572a1501d37bc866855a7f339c3bf03 (patch) | |
tree | 7c47bf17258264168494a7bda5f31036cbaab132 /test | |
parent | be660e11cc2bf68b94451f77e612e0ee0cd666cc (diff) | |
download | redmine-0714ced81572a1501d37bc866855a7f339c3bf03.tar.gz redmine-0714ced81572a1501d37bc866855a7f339c3bf03.zip |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_test.rb | 22 |
1 files changed, 20 insertions, 2 deletions
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 => { |