commit 26628693c2899098539dd7c7c7ff52b90b656a00
parent f0decd3521440d6119ad9333949ce67653d8b2c2
Author: Florian Dold <florian@dold.me>
Date: Thu, 16 May 2024 13:21:55 +0200
-test
Diffstat:
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/packages/taler-harness/src/integrationtests/test-payment-template.ts b/packages/taler-harness/src/integrationtests/test-payment-template.ts
@@ -43,6 +43,8 @@ export async function runPaymentTemplateTest(t: GlobalTestState) {
const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl());
+ const mySummary = "hello, I'm a summary";
+
const createTemplateRes = await merchantClient.createTemplate({
template_id: "template1",
template_description: "my test template",
@@ -53,7 +55,7 @@ export async function runPaymentTemplateTest(t: GlobalTestState) {
minutes: 2,
}),
),
- summary: "hello, I'm a summary",
+ summary: mySummary,
},
editable_defaults: {
amount: "TESTKUDOS:1" as AmountString,
@@ -71,12 +73,26 @@ export async function runPaymentTemplateTest(t: GlobalTestState) {
});
await wres.withdrawalFinishedCond;
+ const talerPayTemplateUri = `taler+http://pay-template/localhost:${merchant.port}/template1`;
+
+ const checkPayTemplateResult = await walletClient.call(
+ WalletApiOperation.CheckPayForTemplate,
+ {
+ talerPayTemplateUri,
+ },
+ );
+
+ t.assertDeepEqual(
+ checkPayTemplateResult.template_contract.summary,
+ mySummary,
+ );
+
// Request a template payment
const preparePayResult = await walletClient.call(
WalletApiOperation.PreparePayForTemplate,
{
- talerPayTemplateUri: `taler+http://pay-template/localhost:${merchant.port}/template1`,
+ talerPayTemplateUri,
templateParams: {},
},
);