taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 4974a00dcd1ea933bbc8545ac2d798b870b853f9
parent 6cbffd2928d49394950bf8c5d95fd0d2351c6b2a
Author: Florian Dold <dold@taler.net>
Date:   Tue, 28 Jul 2026 19:31:18 +0200

harness: check that the ToS format preference follows the client's order

Issue: https://bugs.taler.net/n/11635

Diffstat:
Mpackages/taler-harness/src/integrationtests/test-tos-format.ts | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-tos-format.ts b/packages/taler-harness/src/integrationtests/test-tos-format.ts @@ -104,6 +104,20 @@ export async function runTermOfServiceFormatTest(t: GlobalTestState) { WalletApiOperation.GetExchangeTos, { exchangeBaseUrl: exchange.baseUrl, + acceptedFormat: ["text/html", "text/markdown"], + }, + ); + + // reversing the list reverses the preference; without weights on the + // wire the exchange would pick either way and always answer the same + t.assertDeepEqual(tos.content, "html content"); + } + + { + const tos = await walletClient.client.call( + WalletApiOperation.GetExchangeTos, + { + exchangeBaseUrl: exchange.baseUrl, acceptedFormat: ["text/pdf", "text/html"], }, );