aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness')
-rw-r--r--packages/taler-harness/src/integrationtests/test-denom-unoffered.ts23
1 files changed, 20 insertions, 3 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
index b4268ee42..259cc33f9 100644
--- a/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
+++ b/packages/taler-harness/src/integrationtests/test-denom-unoffered.ts
@@ -100,16 +100,33 @@ export async function runDenomUnofferedTest(t: GlobalTestState) {
transactionId: confirmResp.transactionId,
});
+ t.assertTrue(tx.error != null);
t.assertTrue(
- tx.error?.code === TalerErrorCode.WALLET_UNEXPECTED_REQUEST_ERROR,
+ tx.error.code === TalerErrorCode.WALLET_PAY_MERCHANT_SERVER_ERROR,
);
- const merchantErrorCode = ((tx.error as any).errorResponse as any).code;
+ const merchantErrorCode = (tx.error as any).requestError.errorResponse.code;
+
t.assertDeepEqual(
merchantErrorCode,
- TalerErrorCode.MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_NOT_FOUND,
+ TalerErrorCode.MERCHANT_GENERIC_EXCHANGE_UNEXPECTED_STATUS,
+ );
+
+ const exchangeErrorCode = (tx.error as any).requestError.errorResponse
+ .exchange_ec;
+
+ t.assertDeepEqual(
+ exchangeErrorCode,
+ TalerErrorCode.EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN,
);
+ // Depending on whether the merchant has seen the new denominations or not,
+ // the error code might be different here.
+ // t.assertDeepEqual(
+ // merchantErrorCode,
+ // TalerErrorCode.MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_NOT_FOUND,
+ // );
+
await walletClient.call(WalletApiOperation.AddExchange, {
exchangeBaseUrl: exchange.baseUrl,
forceUpdate: true,