mirror of
https://github.com/redmine/redmine.git
synced 2025-11-04 20:35:57 +01:00
Search engine: display total results count (#906) and count by result type.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1681 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -32,9 +32,17 @@ class SearchControllerTest < Test::Unit::TestCase
|
||||
get :index, :q => 'recipe subproject commit', :submit => 'Search'
|
||||
assert_response :success
|
||||
assert_template 'index'
|
||||
|
||||
assert assigns(:results).include?(Issue.find(2))
|
||||
assert assigns(:results).include?(Issue.find(5))
|
||||
assert assigns(:results).include?(Changeset.find(101))
|
||||
assert_tag :dt, :attributes => { :class => /issue/ },
|
||||
:child => { :tag => 'a', :content => /Add ingredients categories/ },
|
||||
:sibling => { :tag => 'dd', :content => /should be classified by categories/ }
|
||||
|
||||
assert assigns(:results_by_type).is_a?(Hash)
|
||||
assert_equal 4, assigns(:results_by_type)['changesets']
|
||||
assert_tag :a, :content => 'Changesets (4)'
|
||||
end
|
||||
|
||||
def test_search_project_and_subprojects
|
||||
|
||||
Reference in New Issue
Block a user