diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-08-19 20:56:10 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-08-19 20:56:40 +0530 |
commit | d9b73a30c1ce67f611f9d605bdf163c3e868f2c2 (patch) | |
tree | ffdbf9d5e1556df5d1a57a8870fa8057c7ba4ef5 /packages/taler-integrationtests/src/test-refund.ts | |
parent | 082498b20d2a73009bb4193cd95ab409159fb972 (diff) | |
download | wallet-core-d9b73a30c1ce67f611f9d605bdf163c3e868f2c2.tar.xz |
test case for /paid API, implement fault-injected merchant
Diffstat (limited to 'packages/taler-integrationtests/src/test-refund.ts')
-rw-r--r-- | packages/taler-integrationtests/src/test-refund.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/taler-integrationtests/src/test-refund.ts b/packages/taler-integrationtests/src/test-refund.ts index d0d0a0a05..f88a399b5 100644 --- a/packages/taler-integrationtests/src/test-refund.ts +++ b/packages/taler-integrationtests/src/test-refund.ts @@ -17,7 +17,7 @@ /** * Imports. */ -import { runTest, GlobalTestState } from "./harness"; +import { runTest, GlobalTestState, MerchantPrivateApi } from "./harness"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; /** @@ -39,7 +39,7 @@ runTest(async (t: GlobalTestState) => { // Set up order. - const orderResp = await merchant.createOrder("default", { + const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", { order: { summary: "Buy me!", amount: "TESTKUDOS:5", @@ -47,7 +47,7 @@ runTest(async (t: GlobalTestState) => { }, }); - let orderStatus = await merchant.queryPrivateOrderStatus({ + let orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { orderId: orderResp.order_id, }); @@ -68,13 +68,13 @@ runTest(async (t: GlobalTestState) => { // Check if payment was successful. - orderStatus = await merchant.queryPrivateOrderStatus({ + orderStatus = await MerchantPrivateApi.queryPrivateOrderStatus(merchant, { orderId: orderResp.order_id, }); t.assertTrue(orderStatus.order_status === "paid"); - const ref = await merchant.giveRefund({ + const ref = await MerchantPrivateApi.giveRefund(merchant, { amount: "TESTKUDOS:5", instance: "default", justification: "foo", |