summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/functional/search_controller_test.rb9
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