|
|
@@ -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) },
|