Skip to content

Commit

Permalink
chore: test cancel after paid (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
MantisClone authored Oct 31, 2023
1 parent ab1eb42 commit cffb965
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/integration-test/test/node-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ describe('ETH localhost request creation and detection test', () => {
payer: payerIdentity,
};

it('can create ETH requests and pay with ETH Fee proxy', async () => {
it('can create ETH requests and pay with ETH Fee proxy and cancel after paid', async () => {
const currencies = [...CurrencyManager.getDefaultList()];
const requestNetwork = new RequestNetwork({
signatureProvider,
Expand Down Expand Up @@ -696,6 +696,12 @@ describe('ETH localhost request creation and detection test', () => {
expect(event?.parameters?.feeAddress).toBe('0x0d1d4e623D10F9FBA5Db95830F7d3839406C6AF2');
// amount in crypto after apply the rates of the fake aggregators
expect(event?.parameters?.to).toBe('0xc12F17Da12cd01a9CDBB216949BA0b41A6Ffc4EB');

// Cancel the request
const requestDataCancel = await request.cancel(payeeIdentity);
const requestDataCancelConfirmed = await waitForConfirmation(requestDataCancel);
expect(requestDataCancelConfirmed.state).toBe(Types.RequestLogic.STATE.CANCELED);
expect(requestDataCancelConfirmed.balance?.balance).toBe('1000');
});

it('can create & pay a request with any to eth proxy', async () => {
Expand Down

0 comments on commit cffb965

Please sign in to comment.