@@ -238,6 +238,15 class SearchControllerTest < ActionController::TestCase | |||||
238 | assert results.map(&:event_datetime).min >= '20080806T073000'.to_time |
|
238 | assert results.map(&:event_datetime).min >= '20080806T073000'.to_time | |
239 | end |
|
239 | end | |
240 |
|
240 | |||
|
241 | def test_search_with_limited_results | |||
|
242 | issues = (0..24).map {|i| Issue.generate!(:subject => 'search_with_limited_results')}.reverse | |||
|
243 | ||||
|
244 | get :index, :q => 'limited_results' | |||
|
245 | assert_response :success | |||
|
246 | assert_equal 10, assigns(:results).size | |||
|
247 | assert_equal issues[0..9], assigns(:results) | |||
|
248 | end | |||
|
249 | ||||
241 | def test_search_with_invalid_project_id |
|
250 | def test_search_with_invalid_project_id | |
242 | get :index, :id => 195, :q => 'recipe' |
|
251 | get :index, :id => 195, :q => 'recipe' | |
243 | assert_response 404 |
|
252 | assert_response 404 |
General Comments 0
You need to be logged in to leave comments.
Login now