diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-04-26 13:09:14 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-04-26 13:09:14 +0000 |
commit | b557393252cc961c2f47dc90d50b75f76d7d7dca (patch) | |
tree | f7ebe7cfa18e256431393c7183146450e5377048 /test | |
parent | 24875be705fdca8e53b7c39a58023d13421628e3 (diff) | |
download | redmine-b557393252cc961c2f47dc90d50b75f76d7d7dca.tar.gz redmine-b557393252cc961c2f47dc90d50b75f76d7d7dca.zip |
Ticket grouping (#2679).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2696 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/queries.yml | 20 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 21 |
2 files changed, 41 insertions, 0 deletions
diff --git a/test/fixtures/queries.yml b/test/fixtures/queries.yml index a274ce350..a1bb08eff 100644 --- a/test/fixtures/queries.yml +++ b/test/fixtures/queries.yml @@ -73,6 +73,7 @@ queries_005: is_public: true
name: Open issues by priority and tracker
filters: |
+ ---
status_id:
:values:
- "1"
@@ -86,4 +87,23 @@ queries_005: - desc
- - tracker
- asc
+queries_006:
+ id: 6
+ project_id:
+ is_public: true
+ name: Open issues grouped by tracker
+ filters: |
+ ---
+ status_id:
+ :values:
+ - "1"
+ :operator: o
+
+ user_id: 1
+ column_names:
+ group_by: tracker
+ sort_criteria: |
+ ---
+ - - priority
+ - desc
\ No newline at end of file diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index f562ac9c5..dfea32899 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -161,6 +161,22 @@ class IssuesControllerTest < Test::Unit::TestCase assert_not_nil assigns(:issues) end + def test_index_with_query + get :index, :project_id => 1, :query_id => 5 + assert_response :success + assert_template 'index.rhtml' + assert_not_nil assigns(:issues) + assert_nil assigns(:issue_count_by_group) + end + + def test_index_with_grouped_query + get :index, :project_id => 1, :query_id => 6 + assert_response :success + assert_template 'index.rhtml' + assert_not_nil assigns(:issues) + assert_not_nil assigns(:issue_count_by_group) + end + def test_index_csv_with_project get :index, :format => 'csv' assert_response :success @@ -194,6 +210,11 @@ class IssuesControllerTest < Test::Unit::TestCase assert_response :success assert_not_nil assigns(:issues) assert_equal 'application/pdf', @response.content_type + + get :index, :project_id => 1, :query_id => 6, :format => 'pdf' + assert_response :success + assert_not_nil assigns(:issues) + assert_equal 'application/pdf', @response.content_type end def test_index_sort |