@@ -33,6 +33,7 @@ import { CONFIG, ConfigModule } from '../../config/config.module';
3333import { AggregatorLinkRequiredDTO } from '../dto/aggregator-link-required.dto' ;
3434import { EventDTO } from '../dto/event.dto' ;
3535import { HooksService } from './hooks.service' ;
36+ import { BridgeAccountType } from '../../aggregator/interfaces/bridge.interface' ;
3637
3738describe ( 'HooksService' , ( ) => {
3839 let hooksService : HooksService ;
@@ -205,9 +206,10 @@ describe('HooksService', () => {
205206 expires_at : '323423423423' ,
206207 user : { email : 'test@test.com' , uuid : 'rrr' } ,
207208 } ) ;
208- const accountSpy = jest
209- . spyOn ( aggregatorService , 'getAccounts' )
210- . mockResolvedValue ( [ mockAccount , { ...mockAccount , id : 0 } ] ) ;
209+ const accountSpy = jest . spyOn ( aggregatorService , 'getAccounts' ) . mockResolvedValue ( [
210+ { ...mockAccount , type : BridgeAccountType . CHECKING } ,
211+ { ...mockAccount , id : 0 } ,
212+ ] ) ;
211213 const userInfoSpy = jest
212214 . spyOn ( aggregatorService , 'getUserPersonalInformation' )
213215 . mockResolvedValue ( mockPersonalInformation ) ;
@@ -265,7 +267,7 @@ describe('HooksService', () => {
265267 name : ' DUPONT' ,
266268 } ,
267269 ] ,
268- type : 'CREDIT_CARD ' ,
270+ type : 'CHECKING ' ,
269271 usage : 'PERSONAL' ,
270272 transactions : [
271273 {
@@ -441,8 +443,8 @@ describe('HooksService', () => {
441443 amount : 30 ,
442444 currency : 'USD' ,
443445 dates : {
444- bookedAt : undefined ,
445- debitedAt : '2019-04-06T13:53:12.000Z' ,
446+ debitedAt : undefined ,
447+ bookedAt : '2019-04-06T13:53:12.000Z' ,
446448 } ,
447449 description : 'mockRawDescription' ,
448450 isComing : false ,
@@ -455,8 +457,8 @@ describe('HooksService', () => {
455457 amount : 30 ,
456458 currency : 'USD' ,
457459 dates : {
458- bookedAt : undefined ,
459- debitedAt : date ,
460+ debitedAt : undefined ,
461+ bookedAt : date ,
460462 } ,
461463 description : 'mockRawDescription' ,
462464 isComing : false ,
0 commit comments