aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts27
1 files changed, 23 insertions, 4 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
index cd7d137cc..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 { createSimpleTestkudosEnvironmentV3 } from "../harness/environments.js";
import { GlobalTestState } from "../harness/harness.js";
-import { createSimpleTestkudosEnvironmentV3 } from "../harness/helpers.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.
@@ -77,7 +96,7 @@ export async function runWithdrawalManualTest(t: GlobalTestState) {
{
auth: {
username: "admin",
- password: "adminpw",
+ password: "admin-password",
},
},
);