X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f8a606869e50752b4112b1dbc88d80251e261b44..b969c6f7ab842e933f08e89d296478c25dffb349:/test/controllers/users_controller_test.rb diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index c5566e65d..4f4edf10b 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -325,9 +325,6 @@ class UsersControllerTest < ActionDispatch::IntegrationTest assert_select "a[href='/blocks/new/#{ERB::Util.u(user.display_name)}']", 0 end - # Friends shouldn't be visible as we're not logged in - assert_select "div#friends-container", :count => 0 - # Test a user who has been blocked blocked_user = create(:user) create(:user_block, :user => blocked_user) @@ -558,6 +555,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)