diff options
author | Florian Dold <florian@dold.me> | 2023-01-16 13:59:10 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-01-16 13:59:16 +0100 |
commit | c4e8eabce843624b8a000136aaceaa90738b969a (patch) | |
tree | 64996f02d6e117bdf5541de5be0307e9babf2520 | |
parent | e4801dcc31cf32fc81317a821af395f281184537 (diff) |
harness: fix wrong assertions in test-payment-abort
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-abort.ts | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-payment-abort.ts b/packages/taler-harness/src/integrationtests/test-payment-abort.ts index 475c6f7cf..40175cec9 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-abort.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-abort.ts @@ -128,14 +128,15 @@ export async function runPaymentAbortTest(t: GlobalTestState) { }, }); - await t.assertThrowsTalerErrorAsync(async () => { - const confirmPayResp = await wallet.client.call( - WalletApiOperation.ConfirmPay, - { - proposalId, - }, - ); - }); + const confirmPayResp = await wallet.client.call( + WalletApiOperation.ConfirmPay, + { + proposalId, + }, + ); + + // Can't have succeeded yet, but network error results in "pending" state. + t.assertDeepEqual(confirmPayResp.type, ConfirmPayResultType.Pending); const txns = await wallet.client.call(WalletApiOperation.GetTransactions, {}); console.log(j2s(txns)); @@ -149,7 +150,8 @@ export async function runPaymentAbortTest(t: GlobalTestState) { const txns2 = await wallet.client.call(WalletApiOperation.GetTransactions, {}); console.log(j2s(txns2)); - const txTypes = txns.transactions.map((x) => x.type); + const txTypes = txns2.transactions.map((x) => x.type); + console.log(txTypes); t.assertDeepEqual(txTypes, ["withdrawal", "payment", "refund"]); // FIXME: also check extended transaction list for refresh. |