- # We should get an error if no block ID is specified
- assert_raise ActionController::UrlGenerationError do
- get :revoke
- end
+ # 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