harness: fix wrong assertions in test-payment-abort
This commit is contained in:
parent
e4801dcc31
commit
c4e8eabce8
@ -128,14 +128,15 @@ export async function runPaymentAbortTest(t: GlobalTestState) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
await t.assertThrowsTalerErrorAsync(async () => {
|
const confirmPayResp = await wallet.client.call(
|
||||||
const confirmPayResp = await wallet.client.call(
|
WalletApiOperation.ConfirmPay,
|
||||||
WalletApiOperation.ConfirmPay,
|
{
|
||||||
{
|
proposalId,
|
||||||
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, {});
|
const txns = await wallet.client.call(WalletApiOperation.GetTransactions, {});
|
||||||
console.log(j2s(txns));
|
console.log(j2s(txns));
|
||||||
@ -149,7 +150,8 @@ export async function runPaymentAbortTest(t: GlobalTestState) {
|
|||||||
const txns2 = await wallet.client.call(WalletApiOperation.GetTransactions, {});
|
const txns2 = await wallet.client.call(WalletApiOperation.GetTransactions, {});
|
||||||
console.log(j2s(txns2));
|
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"]);
|
t.assertDeepEqual(txTypes, ["withdrawal", "payment", "refund"]);
|
||||||
|
|
||||||
// FIXME: also check extended transaction list for refresh.
|
// FIXME: also check extended transaction list for refresh.
|
||||||
|
Loading…
Reference in New Issue
Block a user