diff options
Diffstat (limited to 'test/functional/search_controller_test.rb')
-rw-r--r-- | test/functional/search_controller_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index ce06ec298..b804bbd28 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -45,6 +45,17 @@ class SearchControllerTest < Test::Unit::TestCase assert_tag :a, :content => 'Changesets (4)' end + def test_search_issues + get :index, :q => 'issue', :issues => 1 + assert_response :success + assert_template 'index' + + assert assigns(:results).include?(Issue.find(8)) + assert assigns(:results).include?(Issue.find(5)) + assert_tag :dt, :attributes => { :class => /issue closed/ }, + :child => { :tag => 'a', :content => /Closed/ } + end + def test_search_project_and_subprojects get :index, :id => 1, :q => 'recipe subproject', :scope => 'subprojects', :submit => 'Search' assert_response :success |