import { TestBed } from '@angular/core/testing' ; import { DaffOrderCoupon } from '@daffodil/order' ; import { DaffOrderCouponFactory } from './order-coupon.factory' ; describe ( 'Order | Testing | Factories | DaffOrderCouponFactory' , ( ) => { let orderFactory ; beforeEach ( ( ) => { TestBed . configureTestingModule ( { providers : [ DaffOrderCouponFactory ] , } ) ; orderFactory = TestBed . inject ( DaffOrderCouponFactory ) ; } ) ; it ( 'should be created' , ( ) => { expect ( orderFactory ) . toBeTruthy ( ) ; } ) ; describe ( 'create' , ( ) => { let result ; beforeEach ( ( ) => { result = orderFactory . create ( ) ; } ) ; it ( 'should return an OrderCoupon' , ( ) => { expect ( result ) . toBeDefined ( ) ; } ) ; describe ( 'Order Coupon object' , ( ) => { it ( 'should have a code' , ( ) => { expect ( result . code ) . toBeDefined ( ) ; } ) ; } ) ; } ) ; } ) ;