summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-12-12 19:52:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-12-12 19:52:28 +0000
commite647e99b741ce0360ee479925009076f48d0d8a5 (patch)
treee4f9bf27a97cbae1842e7e3448c3055cfe5dad48 /test
parent72980f41751a4d09c965733638572f799146e3e3 (diff)
downloadredmine-e647e99b741ce0360ee479925009076f48d0d8a5.tar.gz
redmine-e647e99b741ce0360ee479925009076f48d0d8a5.zip
Allow issues grouping by creation, update and closing date (#13803).
Implemented for PostgreSQL only for now. git-svn-id: http://svn.redmine.org/redmine/trunk@17724 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 9f4c412da..044cc0c54 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -352,6 +352,32 @@ class IssuesControllerTest < Redmine::ControllerTest
end
end
+ def test_index_grouped_by_created_on
+ skip unless IssueQuery.new.groupable_columns.detect {|c| c.name == :created_on}
+
+ get :index, :params => {
+ :set_filter => 1,
+ :group_by => 'created_on'
+ }
+ assert_response :success
+
+ assert_select 'tr.group span.name', :text => '07/19/2006' do
+ assert_select '+ span.count', :text => '2'
+ end
+ end
+
+ def test_index_grouped_by_created_on_as_pdf
+ skip unless IssueQuery.new.groupable_columns.detect {|c| c.name == :created_on}
+
+ get :index, :params => {
+ :set_filter => 1,
+ :group_by => 'created_on',
+ :format => 'pdf'
+ }
+ assert_response :success
+ assert_equal 'application/pdf', response.content_type
+ end
+
def test_index_with_query_grouped_by_list_custom_field
get :index, :params => {
:project_id => 1,