X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/180a61bcc30a165899e0bbadb77d1114170a0fda..5add2d7e1d1d365e80d1d4ef417ff249ca7f35c0:/test/controllers/traces_controller_test.rb?ds=sidebyside diff --git a/test/controllers/traces_controller_test.rb b/test/controllers/traces_controller_test.rb index 73966641e..972cbb3c3 100644 --- a/test/controllers/traces_controller_test.rb +++ b/test/controllers/traces_controller_test.rb @@ -322,6 +322,17 @@ class TracesControllerTest < ActionDispatch::IntegrationTest assert_select "li.page-item a.page-link", :text => "Older Traces", :count => 2 end + def test_index_invalid_paged + # Try some invalid paged accesses + %w[-1 0 fred].each do |id| + get traces_path(:before => id) + assert_redirected_to :controller => :errors, :action => :bad_request + + get traces_path(:after => id) + assert_redirected_to :controller => :errors, :action => :bad_request + end + end + # Check the RSS feed def test_rss user = create(:user)