Adds a test for search with limited results.

git-svn-id: http://svn.redmine.org/redmine/trunk@13736 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2014-12-11 20:18:30 +00:00
parent d4ebbe5ba8
commit 7bc3cf94cb

View File

@@ -238,6 +238,15 @@ class SearchControllerTest < ActionController::TestCase
assert results.map(&:event_datetime).min >= '20080806T073000'.to_time assert results.map(&:event_datetime).min >= '20080806T073000'.to_time
end end
def test_search_with_limited_results
issues = (0..24).map {|i| Issue.generate!(:subject => 'search_with_limited_results')}.reverse
get :index, :q => 'limited_results'
assert_response :success
assert_equal 10, assigns(:results).size
assert_equal issues[0..9], assigns(:results)
end
def test_search_with_invalid_project_id def test_search_with_invalid_project_id
get :index, :id => 195, :q => 'recipe' get :index, :id => 195, :q => 'recipe'
assert_response 404 assert_response 404