Use chai expect instead of expect.js

This commit is contained in:
Blade Barringer
2015-05-11 08:13:23 -05:00
parent 8badc7d1a9
commit ed8a4ef651
8 changed files with 118 additions and 112 deletions
+7 -7
View File
@@ -13,29 +13,29 @@ describe "Subscriptions", ->
user.lastCron = moment().subtract(1, "d")
user.fns.cron()
expect(user.purchased.plan.customerId).to.not.be.ok()
expect(user.purchased.plan.customerId).to.not.exist
payments.createSubscription
user: user
customerId: "123"
paymentMethod: "Stripe"
sub: {key: 'basic_6mo'}
expect(user.purchased.plan.customerId).to.be.ok()
expect(user.purchased.plan.customerId).to.exist
shared.wrap user
cron()
expect(user.purchased.plan.customerId).to.be.ok()
expect(user.purchased.plan.customerId).to.exist
payments.cancelSubscription user: user
cron()
expect(user.purchased.plan.customerId).to.be.ok()
expect(user.purchased.plan.dateTerminated).to.be.ok()
expect(user.purchased.plan.customerId).to.exist
expect(user.purchased.plan.dateTerminated).to.exist
user.purchased.plan.dateTerminated = moment().subtract(2, "d")
cron()
expect(user.purchased.plan.customerId).to.not.be.ok()
expect(user.purchased.plan.customerId).to.not.exist
payments.createSubscription
user: user
customerId: "123"
paymentMethod: "Stripe"
sub: {key: 'basic_6mo'}
expect(user.purchased.plan.dateTerminated).to.not.be.ok()
expect(user.purchased.plan.dateTerminated).to.not.exist
done()