mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 00:06:01 +01:00
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user