Skip to content

Commit

Permalink
chore: fix missing description field in zarinpal tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Keivan-sf committed Jul 31, 2023
1 parent daefe62 commit 8138e81
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/drivers/zarinpal.spec.ts
Expand Up @@ -18,7 +18,9 @@ describe('Zarinpal Driver', () => {

const driver = getPaymentDriver<Zarinpal>('zarinpal', { merchantId: '2134' });

expect(typeof (await driver.requestPayment({ amount: 2000, callbackUrl: 'asd' })).url).toBe('string');
expect(typeof (await driver.requestPayment({ amount: 2000, callbackUrl: 'asd', description: 'test' })).url).toBe(
'string',
);
});

it('throws payment errors accordingly', async () => {
Expand All @@ -31,9 +33,9 @@ describe('Zarinpal Driver', () => {

const driver = getPaymentDriver<Zarinpal>('zarinpal', { merchantId: '2134' });

await expect(async () => await driver.requestPayment({ amount: 2000, callbackUrl: 'asd' })).rejects.toThrow(
RequestException,
);
await expect(
async () => await driver.requestPayment({ amount: 2000, callbackUrl: 'asd', description: 'test' }),
).rejects.toThrow(RequestException);
});

it('verifies the purchase correctly', async () => {
Expand Down

0 comments on commit 8138e81

Please sign in to comment.