X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0b189373848583f848439516a1471f103af9bf0e..12ac6f8f27dfe63d9674fba54862db13a9e6d89a:/test/controllers/users_controller_test.rb?ds=sidebyside diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index c5566e65d..cff52cff2 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -558,6 +558,18 @@ class UsersControllerTest < ActionDispatch::IntegrationTest check_no_page_link "Older Users" end + def test_index_get_invalid_paginated + session_for(create(:administrator_user)) + + %w[-1 0 fred].each do |id| + get users_path(:before => id) + assert_redirected_to :controller => :errors, :action => :bad_request + + get users_path(:after => id) + assert_redirected_to :controller => :errors, :action => :bad_request + end + end + private def check_no_page_link(name)