X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1b7586c9288d694b2bc443d62f3c40502868ff77..bc10bc87586f43e1ec9ca542524f7b8798b29029:/test/controllers/diary_entry_controller_test.rb diff --git a/test/controllers/diary_entry_controller_test.rb b/test/controllers/diary_entry_controller_test.rb index 58fffb8d3..fcd93eb2a 100644 --- a/test/controllers/diary_entry_controller_test.rb +++ b/test/controllers/diary_entry_controller_test.rb @@ -570,6 +570,21 @@ class DiaryEntryControllerTest < ActionController::TestCase check_diary_list end + def test_list_paged + # Create several pages worth of diary entries + create_list(:diary_entry, 50) + + # Try and get the list + get :list + assert_response :success + assert_select "div.diary_post", :count => 20 + + # Try and get the second page + get :list, :params => { :page => 2 } + assert_response :success + assert_select "div.diary_post", :count => 20 + end + def test_rss create(:language, :code => "de") create(:diary_entry, :language_code => "en")