X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1b7586c9288d694b2bc443d62f3c40502868ff77..c1cdddf11f363d24f7c18b3e9df15e1bde3c4302:/test/controllers/notes_controller_test.rb diff --git a/test/controllers/notes_controller_test.rb b/test/controllers/notes_controller_test.rb index c6d89f1ca..e19810851 100644 --- a/test/controllers/notes_controller_test.rb +++ b/test/controllers/notes_controller_test.rb @@ -999,4 +999,20 @@ class NotesControllerTest < ActionController::TestCase get :mine, :params => { :display_name => "non-existent" } assert_response :not_found end + + def test_mine_paged + user = create(:user) + + create_list(:note, 50) do |note| + create(:note_comment, :note => note, :author => user) + end + + get :mine, :params => { :display_name => user.display_name } + assert_response :success + assert_select "table.note_list tr", :count => 11 + + get :mine, :params => { :display_name => user.display_name, :page => 2 } + assert_response :success + assert_select "table.note_list tr", :count => 11 + end end