X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3763cbc7d4cdf3fdead477ee093b3c82aabd49fe..fe1e28b4f45f6aa4bb53dc5163c187c5206b66a7:/test/controllers/trace_controller_test.rb diff --git a/test/controllers/trace_controller_test.rb b/test/controllers/trace_controller_test.rb index 1e7642e36..e53809840 100644 --- a/test/controllers/trace_controller_test.rb +++ b/test/controllers/trace_controller_test.rb @@ -257,6 +257,26 @@ class TraceControllerTest < ActionController::TestCase assert_template "user/no_such_user" end + # Check a multi-page list + def test_list_paged + # Create several pages worth of traces + create_list(:trace, 50) + + # Try and get the list + get :list + assert_response :success + assert_select "table#trace_list tbody", :count => 1 do + assert_select "tr", :count => 20 + end + + # Try and get the second page + get :list, :params => { :page => 2 } + assert_response :success + assert_select "table#trace_list tbody", :count => 1 do + assert_select "tr", :count => 20 + end + end + # Check that the rss loads def test_rss user = create(:user)