summaryrefslogtreecommitdiffstats
path: root/test/functional/search_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-02-06 05:03:23 +0000
committerGo MAEDA <maeda@farend.jp>2021-02-06 05:03:23 +0000
commitcbac878ee441b7fd0af891b7c0e310cce6938c4b (patch)
tree1f67213cd77227654cd9713ac333dfdffecc6005 /test/functional/search_controller_test.rb
parent252c28fa269e740402e6b3c4cc1a2230190fb64c (diff)
downloadredmine-cbac878ee441b7fd0af891b7c0e310cce6938c4b.tar.gz
redmine-cbac878ee441b7fd0af891b7c0e310cce6938c4b.zip
Ignore from search module params sent with empty values (#34615).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20738 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/search_controller_test.rb')
-rw-r--r--test/functional/search_controller_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb
index 24468eaa1..c31abb52b 100644
--- a/test/functional/search_controller_test.rb
+++ b/test/functional/search_controller_test.rb
@@ -428,4 +428,19 @@ class SearchControllerTest < Redmine::ControllerTest
assert_select 'dd span.highlight', :text => 'highlighted'
end
end
+
+ def test_search_should_exclude_empty_modules_params
+ @request.session[:user_id] = 1
+
+ get :index, params: {
+ q: "private",
+ scope: "all",
+ issues: "1",
+ projects: nil
+ }
+
+ assert_response :success
+
+ assert_select '#search-results dt.project', 0
+ end
end