summaryrefslogtreecommitdiffstats
path: root/test/functional/search_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-20 20:31:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-20 20:31:04 +0000
commitb0be3b95aab8c01a7561431579c83cde07f3109f (patch)
treec1d102b7117176523e633e313526550acbcdd317 /test/functional/search_controller_test.rb
parent94dbf641ffd7f479208b135b310585898058e20b (diff)
downloadredmine-b0be3b95aab8c01a7561431579c83cde07f3109f.tar.gz
redmine-b0be3b95aab8c01a7561431579c83cde07f3109f.zip
Ability to search a project and its subprojects (#1264).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1439 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/search_controller_test.rb')
-rw-r--r--test/functional/search_controller_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb
index b02f07793..1c505620b 100644
--- a/test/functional/search_controller_test.rb
+++ b/test/functional/search_controller_test.rb
@@ -37,6 +37,14 @@ class SearchControllerTest < Test::Unit::TestCase
assert assigns(:results).include?(Changeset.find(101))
end
+ def test_search_project_and_subprojects
+ get :index, :id => 1, :q => 'recipe subproject', :scope => 'subprojects', :submit => 'Search'
+ assert_response :success
+ assert_template 'index'
+ assert assigns(:results).include?(Issue.find(1))
+ assert assigns(:results).include?(Issue.find(5))
+ end
+
def test_search_without_searchable_custom_fields
CustomField.update_all "searchable = #{ActiveRecord::Base.connection.quoted_false}"