add test for commit 4f376297dc: show be able to call check refund and finish

This commit is contained in:
Sebastian 2023-01-19 16:14:44 -03:00
parent 4f376297dc
commit b5c29a8bad
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1

View File

@ -84,12 +84,14 @@ export async function runRefundTest(t: GlobalTestState) {
console.log(ref); console.log(ref);
let r = await wallet.client.call(WalletApiOperation.ApplyRefund, { {
const r = await wallet.client.call(WalletApiOperation.ApplyRefund, {
talerRefundUri: ref.talerRefundUri, talerRefundUri: ref.talerRefundUri,
}); });
console.log(r); console.log(r);
await wallet.runUntilDone(); await wallet.runUntilDone();
}
{ {
const r2 = await wallet.client.call(WalletApiOperation.GetBalances, {}); const r2 = await wallet.client.call(WalletApiOperation.GetBalances, {});
@ -100,6 +102,15 @@ export async function runRefundTest(t: GlobalTestState) {
console.log(JSON.stringify(r2, undefined, 2)); console.log(JSON.stringify(r2, undefined, 2));
} }
{
const r3 = await wallet.client.call(WalletApiOperation.ApplyRefundFromPurchaseId, {
purchaseId: r1.proposalId
});
console.log(r3);
await wallet.runUntilDone();
}
await t.shutdown(); await t.shutdown();
} }