From e647e99b741ce0360ee479925009076f48d0d8a5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 12 Dec 2018 19:52:28 +0000 Subject: 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 --- test/functional/issues_controller_test.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'test') 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, -- cgit v1.2.3