From 366a9259035914215425ca3022ab05eb261fcf7a Mon Sep 17 00:00:00 2001 From: Jessica Lawshe Date: Thu, 18 Jun 2020 09:05:41 -0500 Subject: [PATCH] Merge pull request #2919 from overleaf/ta-admin-update-empty Allow Empty Strings in Admin Form Updates GitOrigin-RevId: 79c1315dcb56ebdd82094653c67dcd83b1b53b87 --- services/web/test/acceptance/src/helpers/Subscription.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/web/test/acceptance/src/helpers/Subscription.js b/services/web/test/acceptance/src/helpers/Subscription.js index 8bc52512c3..7fab941213 100644 --- a/services/web/test/acceptance/src/helpers/Subscription.js +++ b/services/web/test/acceptance/src/helpers/Subscription.js @@ -1,4 +1,4 @@ -const { ObjectId } = require('../../../../app/src/infrastructure/mongojs') +const { db, ObjectId } = require('../../../../app/src/infrastructure/mongojs') const { expect } = require('chai') const SubscriptionUpdater = require('../../../../app/src/Features/Subscription/SubscriptionUpdater') const SubscriptionModel = require('../../../../app/src/models/Subscription') @@ -14,6 +14,7 @@ class Subscription { this.manager_ids = options.managerIds || [this.admin_id] this.member_ids = options.memberIds || [] this.invited_emails = options.invitedEmails || [] + this.teamName = options.teamName this.teamInvites = options.teamInvites || [] this.planCode = options.planCode this.recurlySubscription_id = options.recurlySubscription_id @@ -38,6 +39,10 @@ class Subscription { ) } + get(callback) { + db.subscriptions.findOne({ _id: ObjectId(this._id) }, callback) + } + setManagerIds(managerIds, callback) { return SubscriptionModel.findOneAndUpdate( { _id: ObjectId(this._id) },