diff options
author | Go MAEDA <maeda@farend.jp> | 2018-12-07 00:54:38 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-12-07 00:54:38 +0000 |
commit | b543e7dc35296d8c60a3151cb28f487cf60778fb (patch) | |
tree | f5ca67724492aa9d212dc59d7c9f7ac7946fb9df /test/functional | |
parent | 57bfd3a1867b5e929c268f4ceb0f360a37bfd587 (diff) | |
download | redmine-b543e7dc35296d8c60a3151cb28f487cf60778fb.tar.gz redmine-b543e7dc35296d8c60a3151cb28f487cf60778fb.zip |
Merged r17692 from trunk to 3.4-stable (#28636).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17693 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/search_controller_test.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index 97075ea66..c304295f8 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -338,6 +338,46 @@ class SearchControllerTest < Redmine::ControllerTest assert_response 404 end + def test_search_should_include_closed_projects + @request.session[:user_id] = 1 + + project = Project.find(5) + project.close + project.save + + # scope all + get :index, :params => {:q => 'Issue of a private subproject', :scope => 'all'} + assert_response :success + + assert_select '#search-results' do + assert_select 'dt.issue', :text => /Bug #6/ + end + + # scope my_projects + get :index, :params => {:q => 'Issue of a private subproject', :scope => 'my_projects'} + assert_response :success + + assert_select '#search-results' do + assert_select 'dt.issue', :text => /Bug #6/ + end + + # scope subprojects + get :index, :params => {:id => 1, :q => 'Issue of a private subproject', :scope => 'subprojects'} + assert_response :success + + assert_select '#search-results' do + assert_select 'dt.issue', :text => /Bug #6/ + end + + # scope project + get :index, :params => {:id => 5, :q => 'Issue of a private subproject'} + assert_response :success + + assert_select '#search-results' do + assert_select 'dt.issue', :text => /Bug #6/ + end + end + def test_quick_jump_to_issue # issue of a public project get :index, :params => {:q => "3"} |