unset messageOpts as well

This commit is contained in:
Henry Oswald 2016-01-21 13:40:24 +00:00
parent 50d66e9f31
commit 84aad3e184
2 changed files with 2 additions and 2 deletions

View file

@ -34,5 +34,5 @@ module.exports =
user_id:user_id
_id:ObjectId(notification_id)
updateOperation =
"$unset": {templateKey:true}
"$unset": {templateKey:true, messageOpts: true}
db.notifications.update searchOps, updateOperation, callback

View file

@ -69,6 +69,6 @@ describe 'creating a user', ->
user_id:user_id
_id:ObjectId(notification_id)
updateOperation =
"$unset": {templateKey:true}
"$unset": {templateKey:true, messageOpts:true}
@updateStub.calledWith(searchOps, updateOperation).should.equal true
done()