From 84aad3e1842afbd0b5d6f379833f0ca897009458 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 21 Jan 2016 13:40:24 +0000 Subject: [PATCH] unset messageOpts as well --- services/notifications/app/coffee/Notifications.coffee | 2 +- .../notifications/test/unit/coffee/NotificationsTests.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/notifications/app/coffee/Notifications.coffee b/services/notifications/app/coffee/Notifications.coffee index 9d61452e81..51001ea8eb 100644 --- a/services/notifications/app/coffee/Notifications.coffee +++ b/services/notifications/app/coffee/Notifications.coffee @@ -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 diff --git a/services/notifications/test/unit/coffee/NotificationsTests.coffee b/services/notifications/test/unit/coffee/NotificationsTests.coffee index adb58f6a48..d8ff753c4e 100644 --- a/services/notifications/test/unit/coffee/NotificationsTests.coffee +++ b/services/notifications/test/unit/coffee/NotificationsTests.coffee @@ -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()