Ability to search a project and its subprojects (#1264).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1439 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-05-20 20:31:04 +00:00
parent 94dbf641ff
commit b0be3b95aa
29 changed files with 39 additions and 2 deletions
@@ -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}"