aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-11-13 12:22:12 +0100
committerFlorian Dold <florian@dold.me>2023-11-13 12:22:12 +0100
commitd1acc36414d251d92b2669acfe7d62ff614caeec (patch)
tree21c88ce1199215ac44099b659b214d9cb444a888 /packages
parente065472c97723c1c07e87a7371fb2e91470e53d9 (diff)
downloadwallet-core-d1acc36414d251d92b2669acfe7d62ff614caeec.tar.xz
harness: fix denom-unoffered test
Diffstat (limited to 'packages')
-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,