diff options
author | Florian Dold <florian@dold.me> | 2022-11-02 14:23:26 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-11-02 14:23:26 +0100 |
commit | 1e6e1a22cdb16975f3a914b2f1be6db0ae1b241d (patch) | |
tree | ef3b0bcf0d8c8bf8bd3fd2082b53d450f7a09f11 /packages/taler-wallet-cli/src | |
parent | fe011321a4b65bc0736634ee2a4d9c7bf0618351 (diff) | |
download | wallet-core-1e6e1a22cdb16975f3a914b2f1be6db0ae1b241d.tar.xz |
wallet-core: fix exchange management test case, surface exchange update error info in list
Diffstat (limited to 'packages/taler-wallet-cli/src')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts b/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts index f0b4ac8c9..6b63c3741 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-exchange-management.ts @@ -194,12 +194,16 @@ export async function runExchangeManagementTest( t.assertTrue( err1.errorDetail.code === TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE, ); - exchangesList = await wallet.client.call( WalletApiOperation.ListExchanges, {}, ); - t.assertTrue(exchangesList.exchanges.length === 0); + console.log("exchanges list", j2s(exchangesList)); + t.assertTrue(exchangesList.exchanges.length === 1); + t.assertTrue( + exchangesList.exchanges[0].lastUpdateErrorInfo?.error.code === + TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE, + ); /* * ========================================================================= @@ -240,7 +244,11 @@ export async function runExchangeManagementTest( WalletApiOperation.ListExchanges, {}, ); - t.assertTrue(exchangesList.exchanges.length === 0); + t.assertTrue(exchangesList.exchanges.length === 1); + t.assertTrue( + exchangesList.exchanges[0].lastUpdateErrorInfo?.error.code === + TalerErrorCode.WALLET_EXCHANGE_PROTOCOL_VERSION_INCOMPATIBLE, + ); /* * ========================================================================= |