fix cancel subscription on delete user

This commit is contained in:
Henry Oswald 2015-01-02 10:37:59 +00:00
parent 505675803b
commit 7e64b88fcf
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ module.exports =
(cb)->
ProjectDeleter.deleteUsersProjects user._id, cb
(cb)->
SubscriptionHandler.cancelSubscription user._id, cb
SubscriptionHandler.cancelSubscription user, cb
(cb)->
user.remove cb
], (err)->

View file

@ -49,5 +49,5 @@ describe "UserDeleter", ->
it "should unsubscribe the user", (done)->
@UserDeleter.deleteUser @user._id, (err)=>
@SubscriptionHandler.cancelSubscription.calledWith(@user._id).should.equal true
@SubscriptionHandler.cancelSubscription.calledWith(@user).should.equal true
done()