diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-11 20:18:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-11 20:18:30 +0000 |
commit | 7bc3cf94cbb9ad4ed13dace618db28d2a327e168 (patch) | |
tree | 11eb6d5932f8919bb749857f49dcd3402dfb77f5 /test/functional/search_controller_test.rb | |
parent | d4ebbe5ba8c822bf320122add151fcc5a9c07cd7 (diff) | |
download | redmine-7bc3cf94cbb9ad4ed13dace618db28d2a327e168.tar.gz redmine-7bc3cf94cbb9ad4ed13dace618db28d2a327e168.zip |
Adds a test for search with limited results.
git-svn-id: http://svn.redmine.org/redmine/trunk@13736 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/search_controller_test.rb')
-rw-r--r-- | test/functional/search_controller_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index 4124985db..1a11e0444 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -238,6 +238,15 @@ class SearchControllerTest < ActionController::TestCase assert results.map(&:event_datetime).min >= '20080806T073000'.to_time 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 get :index, :id => 195, :q => 'recipe' assert_response 404 |