Skip to content

Commit

Permalink
feat(2756): fix test case 'Asset accounts are created'
Browse files Browse the repository at this point in the history
  • Loading branch information
koekiebox committed Jun 18, 2024
1 parent 318860b commit 912768b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/backend/src/asset/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,17 @@ describe('Asset Service', (): void => {

test('Asset accounts are created', async (): Promise<void> => {
const accountingService = await deps.use('accountingService')
const liquiditySpy = jest.spyOn(
const liquidityAndSettlementSpy = jest.spyOn(
accountingService,
'createLiquidityAccount'
)
const settlementSpy = jest.spyOn(
accountingService,
'createSettlementAccount'
'createLiquidityAndLinkedSettlementAccount'
)

const asset = await assetService.create(randomAsset())
assert.ok(!isAssetError(asset))

expect(liquiditySpy).toHaveBeenCalledWith(
expect(liquidityAndSettlementSpy).toHaveBeenCalledWith(
asset,
LiquidityAccountType.ASSET,
expect.any(Function)
)
expect(settlementSpy).toHaveBeenCalledWith(
asset.ledger,
expect.any(Function)
)
Expand Down

0 comments on commit 912768b

Please sign in to comment.