Mercurial > hg > soundsoftware-site
diff test/functional/reports_controller_test.rb @ 1526:404aa68d4227
Merge from live branch
author | Chris Cannam |
---|---|
date | Thu, 11 Sep 2014 12:46:20 +0100 |
parents | e248c7af89ec |
children |
line wrap: on
line diff
--- a/test/functional/reports_controller_test.rb Mon Mar 17 08:57:04 2014 +0000 +++ b/test/functional/reports_controller_test.rb Thu Sep 11 12:46:20 2014 +0100 @@ -1,5 +1,5 @@ # Redmine - project management software -# Copyright (C) 2006-2012 Jean-Philippe Lang +# Copyright (C) 2006-2014 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -25,12 +25,8 @@ :member_roles, :members, :enabled_modules, - :workflows, :versions - def setup - end - def test_get_issue_report get :issue_report, :id => 1 @@ -58,6 +54,24 @@ end end + def test_get_issue_report_details_by_tracker_should_show_issue_count + Issue.delete_all + Issue.generate!(:tracker_id => 1) + Issue.generate!(:tracker_id => 1) + Issue.generate!(:tracker_id => 1, :status_id => 5) + Issue.generate!(:tracker_id => 2) + + get :issue_report_details, :id => 1, :detail => 'tracker' + assert_select 'table.list tbody :nth-child(1)' do + assert_select 'td', :text => 'Bug' + assert_select ':nth-child(2)', :text => '2' # status:1 + assert_select ':nth-child(3)', :text => '-' # status:2 + assert_select ':nth-child(8)', :text => '2' # open + assert_select ':nth-child(9)', :text => '1' # closed + assert_select ':nth-child(10)', :text => '3' # total + end + end + def test_get_issue_report_details_by_priority get :issue_report_details, :id => 1, :detail => 'priority' assert_equal IssuePriority.all.reverse, assigns(:rows)