diff options
author | jessib <jessib@riseup.net> | 2013-11-11 13:15:26 -0800 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-11-11 13:15:26 -0800 |
commit | d4d970095d0370d7d5744fdc0ebc7b8d9bbd1a4c (patch) | |
tree | b035b29ccb465a75bfd019d46f037dc5de6fbc78 /users/test/functional | |
parent | 8c19b447dec3982107f93ea1ae2626f844045249 (diff) | |
parent | 69a41bee2548fa8743dd3188b0ebfc84dac17062 (diff) |
Merge pull request #109 from azul/feature/clear-all-data-of-deleted-user
Feature/clear data of deleted user
Diffstat (limited to 'users/test/functional')
-rw-r--r-- | users/test/functional/users_controller_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/users/test/functional/users_controller_test.rb b/users/test/functional/users_controller_test.rb index 75d900f..9c5f8d9 100644 --- a/users/test/functional/users_controller_test.rb +++ b/users/test/functional/users_controller_test.rb @@ -77,7 +77,11 @@ class UsersControllerTest < ActionController::TestCase test "admin can destroy user" do user = find_record :user + + # we destroy the user record and the associated data... user.expects(:destroy) + Identity.expects(:disable_all_for).with(user) + Ticket.expects(:destroy_all_from).with(user) login :is_admin? => true delete :destroy, :id => user.id @@ -88,7 +92,11 @@ class UsersControllerTest < ActionController::TestCase test "user can cancel account" do user = find_record :user + + # we destroy the user record and the associated data... user.expects(:destroy) + Identity.expects(:disable_all_for).with(user) + Ticket.expects(:destroy_all_from).with(user) login user expect_logout |