mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-22 13:48:46 +00:00
Corrected indentation of purchase test
This commit is contained in:
parent
35f98993c4
commit
6f8133d760
1 changed files with 24 additions and 24 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue