- ##
- # 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
-