aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src')
-rw-r--r--packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts25
1 files changed, 22 insertions, 3 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
index 568da1b0c..6f12c4eba 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
@@ -19,15 +19,15 @@
*/
import {
AbsoluteTime,
- TalerCorebankApiClient,
+ AmountString,
Logger,
+ ScopeType,
WireGatewayApiClient,
j2s,
- AmountString,
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
-import { GlobalTestState } from "../harness/harness.js";
import { createSimpleTestkudosEnvironmentV3 } from "../harness/environments.js";
+import { GlobalTestState } from "../harness/harness.js";
const logger = new Logger("test-withdrawal-manual.ts");
@@ -50,6 +50,25 @@ export async function runWithdrawalManualTest(t: GlobalTestState) {
const tStart = AbsoluteTime.now();
+ // Test some getWithdrawalDetailsForAmount requests
+ {
+ // Zero should be acceptable
+ const det = await walletClient.call(
+ WalletApiOperation.GetWithdrawalDetailsForAmount,
+ {
+ amount: "TESTKUDOS:0",
+ restrictScope: {
+ type: ScopeType.Exchange,
+ currency: "TESTKUDOS",
+ url: exchange.baseUrl,
+ },
+ },
+ );
+ t.assertAmountEquals(det.amountEffective, "TESTKUDOS:0");
+ t.assertAmountEquals(det.amountRaw, "TESTKUDOS:0");
+ t.assertDeepEqual(det.numCoins, 0);
+ }
+
logger.info("starting AcceptManualWithdrawal request");
// We expect this to return immediately.