Mercurial > hg > soundsoftware-site
comparison test/functional/reports_controller_test.rb @ 1464:261b3d9a4903 redmine-2.4
Update to Redmine 2.4 branch rev 12663
author | Chris Cannam |
---|---|
date | Tue, 14 Jan 2014 14:37:42 +0000 |
parents | 433d4f72a19b |
children | e248c7af89ec |
comparison
equal
deleted
inserted
replaced
1296:038ba2d95de8 | 1464:261b3d9a4903 |
---|---|
1 # Redmine - project management software | 1 # Redmine - project management software |
2 # Copyright (C) 2006-2012 Jean-Philippe Lang | 2 # Copyright (C) 2006-2013 Jean-Philippe Lang |
3 # | 3 # |
4 # This program is free software; you can redistribute it and/or | 4 # This program is free software; you can redistribute it and/or |
5 # modify it under the terms of the GNU General Public License | 5 # modify it under the terms of the GNU General Public License |
6 # as published by the Free Software Foundation; either version 2 | 6 # as published by the Free Software Foundation; either version 2 |
7 # of the License, or (at your option) any later version. | 7 # of the License, or (at your option) any later version. |
23 :projects_trackers, | 23 :projects_trackers, |
24 :roles, | 24 :roles, |
25 :member_roles, | 25 :member_roles, |
26 :members, | 26 :members, |
27 :enabled_modules, | 27 :enabled_modules, |
28 :workflows, | |
29 :versions | 28 :versions |
30 | |
31 def setup | |
32 end | |
33 | 29 |
34 def test_get_issue_report | 30 def test_get_issue_report |
35 get :issue_report, :id => 1 | 31 get :issue_report, :id => 1 |
36 | 32 |
37 assert_response :success | 33 assert_response :success |
56 assert_not_nil assigns(:data) | 52 assert_not_nil assigns(:data) |
57 assert_not_nil assigns(:report_title) | 53 assert_not_nil assigns(:report_title) |
58 end | 54 end |
59 end | 55 end |
60 | 56 |
57 def test_get_issue_report_details_by_tracker_should_show_issue_count | |
58 Issue.delete_all | |
59 Issue.generate!(:tracker_id => 1) | |
60 Issue.generate!(:tracker_id => 1) | |
61 Issue.generate!(:tracker_id => 1, :status_id => 5) | |
62 Issue.generate!(:tracker_id => 2) | |
63 | |
64 get :issue_report_details, :id => 1, :detail => 'tracker' | |
65 assert_select 'table.list tbody :nth-child(1)' do | |
66 assert_select 'td', :text => 'Bug' | |
67 assert_select ':nth-child(2)', :text => '2' # status:1 | |
68 assert_select ':nth-child(3)', :text => '-' # status:2 | |
69 assert_select ':nth-child(8)', :text => '2' # open | |
70 assert_select ':nth-child(9)', :text => '1' # closed | |
71 assert_select ':nth-child(10)', :text => '3' # total | |
72 end | |
73 end | |
74 | |
61 def test_get_issue_report_details_by_priority | 75 def test_get_issue_report_details_by_priority |
62 get :issue_report_details, :id => 1, :detail => 'priority' | 76 get :issue_report_details, :id => 1, :detail => 'priority' |
63 assert_equal IssuePriority.all.reverse, assigns(:rows) | 77 assert_equal IssuePriority.all.reverse, assigns(:rows) |
64 end | 78 end |
65 | 79 |