summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-28 11:34:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-28 11:34:12 +0000
commit66540afc08209939dd4b9a6d9969b99a6ffecfc9 (patch)
tree032b30458d7db4246ce8803e67e8c1e798e2f6c0 /test
parent99b52c87967752b661662a8c85dd674042e13218 (diff)
downloadredmine-66540afc08209939dd4b9a6d9969b99a6ffecfc9.tar.gz
redmine-66540afc08209939dd4b9a6d9969b99a6ffecfc9.zip
Adds dynamic columns selection on the issue list (#4272).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3105 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issues_controller_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 3ece848b7..9555db4ea 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -255,6 +255,22 @@ class IssuesControllerTest < ActionController::TestCase
assert !issues.empty?
assert_equal issues.sort {|a,b| a.tracker == b.tracker ? b.id <=> a.id : a.tracker <=> b.tracker }.collect(&:id), issues.collect(&:id)
end
+
+ def test_index_with_columns
+ columns = ['tracker', 'subject', 'assigned_to']
+ get :index, :set_filter => 1, :query => { 'column_names' => columns}
+ assert_response :success
+
+ # query should use specified columns
+ query = assigns(:query)
+ assert_kind_of Query, query
+ assert_equal columns, query.column_names.map(&:to_s)
+
+ # columns should be stored in session
+ assert_kind_of Hash, session[:query]
+ assert_kind_of Array, session[:query][:column_names]
+ assert_equal columns, session[:query][:column_names].map(&:to_s)
+ end
def test_gantt
get :gantt, :project_id => 1