Skip to content

Commit

Permalink
updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patnir committed Sep 7, 2023
1 parent 84e4811 commit 6ba92da
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ironfish/src/rpc/routes/wallet/burnAsset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ describe('Route wallet/burnAsset', () => {
})
jest.spyOn(wallet, 'burn').mockResolvedValueOnce(burnTransaction)

const accountAsset = await account.getAsset(assetId)

expect(accountAsset).toBeDefined()

const response = await routeTest.client.wallet.burnAsset({
account: account.name,
assetId: assetId.toString('hex'),
Expand All @@ -82,6 +86,18 @@ describe('Route wallet/burnAsset', () => {
})

expect(response.content).toEqual({
asset: {
id: asset.id().toString('hex'),
metadata: asset.metadata().toString('hex'),
name: asset.name().toString('hex'),
creator: asset.creator().toString('hex'),
nonce: accountAsset?.nonce ?? null,
owner: accountAsset?.owner?.toString('hex') ?? null,
sequence: accountAsset?.sequence ?? null,
supply: accountAsset?.supply?.toString() ?? null,
blockHash: accountAsset?.blockHash?.toString('hex') ?? null,
createdTransactionHash: accountAsset?.createdTransactionHash?.toString('hex') ?? null,
},
assetId: asset.id().toString('hex'),
name: asset.name().toString('hex'),
hash: burnTransaction.hash().toString('hex'),
Expand Down

0 comments on commit 6ba92da

Please sign in to comment.