import { expect } from 'chai'; import { Subscription, SubscriptionRatePlan, SubscriptionRatePlanCharge, } from '../../../src/models/subscription'; describe('Subscription', () => { it('should construct', () => { expect(() => { new Subscription(); }).to.not.throw(); }); it('should apply passed data', () => { const id = 'test'; const model = new Subscription({ id }); expect(model.id).to.equal(id); }); }); describe('SubscriptionRatePlan', () => { it('should construct', () => { expect(() => { new SubscriptionRatePlan(); }).to.not.throw(); }); it('should apply passed data', () => { const id = 'test'; const model = new SubscriptionRatePlan({ id }); expect(model.id).to.equal(id); }); }); describe('SubscriptionRatePlanCharge', () => { it('should construct', () => { expect(() => { new SubscriptionRatePlanCharge(); }).to.not.throw(); }); it('should apply passed data', () => { const name = 'test'; const model = new SubscriptionRatePlanCharge({ name }); expect(model.name).to.equal(name); }); });