summaryrefslogtreecommitdiffstats
path: root/test/functional/queries_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-11-30 00:58:45 +0000
committerGo MAEDA <maeda@farend.jp>2019-11-30 00:58:45 +0000
commitf33d6177feb8203ca3ecb07c2ff064170e1db5f1 (patch)
tree352081752b44c3c9b6c45ea03b3f6098a96034d7 /test/functional/queries_controller_test.rb
parent84ab182bc0737b4b8fdd56172dca4af2170d950f (diff)
downloadredmine-f33d6177feb8203ca3ecb07c2ff064170e1db5f1.tar.gz
redmine-f33d6177feb8203ca3ecb07c2ff064170e1db5f1.zip
Add buttons to save/edit/delete a custom query to calendar view (#32194).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@19322 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/queries_controller_test.rb')
-rw-r--r--test/functional/queries_controller_test.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/functional/queries_controller_test.rb b/test/functional/queries_controller_test.rb
index 55c46478c..2db4ac7d6 100644
--- a/test/functional/queries_controller_test.rb
+++ b/test/functional/queries_controller_test.rb
@@ -153,6 +153,41 @@ class QueriesControllerTest < Redmine::ControllerTest
assert_response :success
end
+ def test_new_with_gantt_params
+ @request.session[:user_id] = 2
+ get :new, :params => { :gantt => 1 }
+ assert_response :success
+
+ assert_select 'input[type="hidden"]#gantt', 1
+ assert_select 'fieldset#options'
+ assert_select 'fieldset#filters'
+ assert_select 'fieldset legend', { :text => 'Sort', :count => 0 }
+ assert_select 'fieldset#columns'
+ end
+
+ def test_new_with_calendar_params
+ @request.session[:user_id] = 2
+ get :new, :params => { :calendar => 1 }
+ assert_response :success
+
+ assert_select 'input[type="hidden"]#calendar', 1
+ assert_select 'fieldset#options', :count => 0
+ assert_select 'fieldset#filters'
+ assert_select 'fieldset legend', { :text => 'Sort', :count => 0 }
+ assert_select 'fieldset#columns', :count => 0
+ end
+
+ def test_new_without_gantt_and_calendar_params
+ @request.session[:user_id] = 2
+ get :new
+ assert_response :success
+
+ assert_select 'fieldset#options'
+ assert_select 'fieldset#filters'
+ assert_select 'fieldset legend', { :text => 'Sort' }
+ assert_select 'fieldset#columns'
+ end
+
def test_create_project_public_query
@request.session[:user_id] = 2
post :create, :params => {