]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/users_controller_test.rb
Make setLatLng a private function
[rails.git] / test / controllers / users_controller_test.rb
index c5566e65db4ae534015fa97331fba7c6f2c7fd05..cff52cff25a24fc2ff3ccf251c3b533b6ba94ce5 100644 (file)
@@ -558,6 +558,18 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
     check_no_page_link "Older Users"
   end
 
     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)
   private
 
   def check_no_page_link(name)