aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/hooks/transfer.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/merchant-backoffice-ui/src/hooks/transfer.test.ts')
-rw-r--r--packages/merchant-backoffice-ui/src/hooks/transfer.test.ts29
1 files changed, 3 insertions, 26 deletions
diff --git a/packages/merchant-backoffice-ui/src/hooks/transfer.test.ts b/packages/merchant-backoffice-ui/src/hooks/transfer.test.ts
index 10cb4226b..a7187af27 100644
--- a/packages/merchant-backoffice-ui/src/hooks/transfer.test.ts
+++ b/packages/merchant-backoffice-ui/src/hooks/transfer.test.ts
@@ -31,18 +31,9 @@ describe("transfer api interaction with listing", () => {
const env = new ApiMockEnvironment();
env.addRequestExpectation(API_LIST_TRANSFERS, {
- qparam: { limit: 0 },
- response: {
- transfers: [{ wtid: "2" } as MerchantBackend.Transfers.TransferDetails],
- },
- });
- // FIXME: is this query really needed? if the hook is rendered without
- // position argument then then backend is returning the newest and no need
- // to this second query
- env.addRequestExpectation(API_LIST_TRANSFERS, {
qparam: { limit: -20 },
response: {
- transfers: [],
+ transfers: [{ wtid: "2" } as MerchantBackend.Transfers.TransferDetails],
},
});
@@ -84,16 +75,9 @@ describe("transfer api interaction with listing", () => {
});
env.addRequestExpectation(API_LIST_TRANSFERS, {
- qparam: { limit: 0 },
- response: {
- transfers: [{ wtid: "2" } as any, { wtid: "3" } as any],
- },
- });
-
- env.addRequestExpectation(API_LIST_TRANSFERS, {
qparam: { limit: -20 },
response: {
- transfers: [],
+ transfers: [{ wtid: "3" } as any, { wtid: "2" } as any],
},
});
@@ -130,16 +114,9 @@ describe("transfer listing pagination", () => {
const env = new ApiMockEnvironment();
env.addRequestExpectation(API_LIST_TRANSFERS, {
- qparam: { limit: 0, payto_uri: "payto://" },
- response: {
- transfers: [{ wtid: "2" } as any],
- },
- });
-
- env.addRequestExpectation(API_LIST_TRANSFERS, {
qparam: { limit: -20, payto_uri: "payto://" },
response: {
- transfers: [{ wtid: "1" } as any],
+ transfers: [{ wtid: "2" }, { wtid: "1" } as any],
},
});