X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cc2a72bdd7f8aa00cbf8d0e00fb8132f4698172e..dcb0369788b70b262845c601cad0a874b427725a:/test/controllers/user_blocks_controller_test.rb diff --git a/test/controllers/user_blocks_controller_test.rb b/test/controllers/user_blocks_controller_test.rb index 6d99db1cd..ed310f52e 100644 --- a/test/controllers/user_blocks_controller_test.rb +++ b/test/controllers/user_blocks_controller_test.rb @@ -33,10 +33,6 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest { :path => "/user_blocks/1", :method => :delete }, { :controller => "user_blocks", :action => "destroy", :id => "1" } ) - assert_routing( - { :path => "/blocks/1/revoke", :method => :post }, - { :controller => "user_blocks", :action => "revoke", :id => "1" } - ) assert_routing( { :path => "/user/username/blocks", :method => :get }, @@ -549,21 +545,6 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest assert_equal other_moderator_user, block.revoker end - ## - # test the revoke action - def test_revoke - active_block = create(:user_block) - - # Login as a moderator - session_for(create(:moderator_user)) - - # Check that revoking a block works using POST - post revoke_user_block_path(:id => active_block, :confirm => true) - assert_redirected_to user_block_path(active_block) - b = UserBlock.find(active_block.id) - assert_in_delta Time.now.utc, b.ends_at, 1 - end - ## # test the revoke all page def test_revoke_all_page