Corrected indentation of purchase test
This commit is contained in:
+24
-24
@@ -636,30 +636,30 @@ describe "API", ->
|
||||
user = _user
|
||||
done()
|
||||
|
||||
it "Handles unsubscription", (done) ->
|
||||
cron = ->
|
||||
user.lastCron = moment().subtract(1, "d")
|
||||
user.fns.cron()
|
||||
it "Handles unsubscription", (done) ->
|
||||
cron = ->
|
||||
user.lastCron = moment().subtract(1, "d")
|
||||
user.fns.cron()
|
||||
|
||||
expect(user.purchased.plan.customerId).to.not.be.ok()
|
||||
payments.createSubscription user,
|
||||
customerId: "123"
|
||||
paymentMethod: "Stripe"
|
||||
expect(user.purchased.plan.customerId).to.not.be.ok()
|
||||
payments.createSubscription user,
|
||||
customerId: "123"
|
||||
paymentMethod: "Stripe"
|
||||
|
||||
expect(user.purchased.plan.customerId).to.be.ok()
|
||||
shared.wrap user
|
||||
cron()
|
||||
expect(user.purchased.plan.customerId).to.be.ok()
|
||||
payments.cancelSubscription user
|
||||
cron()
|
||||
expect(user.purchased.plan.customerId).to.be.ok()
|
||||
expect(user.purchased.plan.dateTerminated).to.be.ok()
|
||||
user.purchased.plan.dateTerminated = moment().subtract(2, "d")
|
||||
cron()
|
||||
expect(user.purchased.plan.customerId).to.not.be.ok()
|
||||
payments.createSubscription user,
|
||||
customerId: "123"
|
||||
paymentMethod: "Stripe"
|
||||
expect(user.purchased.plan.customerId).to.be.ok()
|
||||
shared.wrap user
|
||||
cron()
|
||||
expect(user.purchased.plan.customerId).to.be.ok()
|
||||
payments.cancelSubscription user
|
||||
cron()
|
||||
expect(user.purchased.plan.customerId).to.be.ok()
|
||||
expect(user.purchased.plan.dateTerminated).to.be.ok()
|
||||
user.purchased.plan.dateTerminated = moment().subtract(2, "d")
|
||||
cron()
|
||||
expect(user.purchased.plan.customerId).to.not.be.ok()
|
||||
payments.createSubscription user,
|
||||
customerId: "123"
|
||||
paymentMethod: "Stripe"
|
||||
|
||||
expect(user.purchased.plan.dateTerminated).to.not.be.ok()
|
||||
done()
|
||||
expect(user.purchased.plan.dateTerminated).to.not.be.ok()
|
||||
done()
|
||||
|
||||
Reference in New Issue
Block a user