@@ -51,6 +51,7 @@ import {
5151import { GraphQLErrorCode } from '../errors'
5252import { Tenant } from '../../tenants/model'
5353import { createTenant } from '../../tests/tenant'
54+ import { faker } from '@faker-js/faker'
5455
5556describe ( 'Liquidity Resolvers' , ( ) : void => {
5657 let deps : IocContract < AppServices >
@@ -3493,6 +3494,9 @@ describe('Liquidity Resolvers', (): void => {
34933494
34943495 test ( 'Can deposit account liquidity' , async ( ) : Promise < void > => {
34953496 const depositSpy = jest . spyOn ( accountingService , 'createDeposit' )
3497+ const dataToTransmit = JSON . stringify ( {
3498+ data : faker . internet . email ( )
3499+ } )
34963500 const response = await appContainer . apolloClient
34973501 . mutate ( {
34983502 mutation : gql `
@@ -3507,7 +3511,8 @@ describe('Liquidity Resolvers', (): void => {
35073511 variables : {
35083512 input : {
35093513 outgoingPaymentId : outgoingPayment . id ,
3510- idempotencyKey : uuid ( )
3514+ idempotencyKey : uuid ( ) ,
3515+ dataToTransmit
35113516 }
35123517 }
35133518 } )
@@ -3529,6 +3534,13 @@ describe('Liquidity Resolvers', (): void => {
35293534 await expect (
35303535 accountingService . getBalance ( outgoingPayment . id )
35313536 ) . resolves . toEqual ( outgoingPayment . debitAmount . value )
3537+ await expect (
3538+ OutgoingPayment . query ( knex ) . findById ( outgoingPayment . id )
3539+ ) . resolves . toEqual (
3540+ expect . objectContaining ( {
3541+ dataToTransmit
3542+ } )
3543+ )
35323544 } )
35333545
35343546 test ( "Can't deposit for non-existent outgoing payment id" , async ( ) : Promise < void > => {
0 commit comments