btrz-api-client 8.65.0 → 8.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslint-report.json +1 -0
- package/.eslintignore +2 -0
- package/fetch-test.js +5 -6
- package/index.js +2 -2
- package/lib/client-standalone-min.js +3 -3
- package/lib/client.js +50 -38
- package/lib/endpoints/accounts/journey-prices-settings.js +2 -2
- package/lib/endpoints/accounts/market-pricing-settings.js +3 -3
- package/lib/endpoints/accounts/multiproduct-sales-settings.js +6 -2
- package/lib/endpoints/accounts/operation-settings.js +3 -1
- package/lib/endpoints/btrzpay/referenced-payments.js +6 -2
- package/lib/endpoints/btrzpay/square.js +12 -3
- package/lib/endpoints/btrzpay/stripe-terminals.js +9 -3
- package/lib/endpoints/btrzpay/terminalPayments.js +14 -4
- package/lib/endpoints/inventory/document-types.js +2 -1
- package/lib/endpoints/inventory/products.js +1 -0
- package/lib/endpoints/operations/movements.js +7 -2
- package/lib/endpoints/operations/pago-express.js +9 -3
- package/lib/endpoints/operations/parcels.js +3 -1
- package/lib/endpoints/sales/cancellations.js +31 -8
- package/package.json +6 -8
- package/src/client.js +0 -1
- package/src/endpoints/accounts/journey-prices-settings.js +2 -2
- package/src/endpoints/accounts/market-pricing-settings.js +3 -3
- package/src/endpoints/accounts/multiproduct-sales-settings.js +6 -2
- package/src/endpoints/accounts/operation-settings.js +3 -1
- package/src/endpoints/btrzpay/referenced-payments.js +6 -2
- package/src/endpoints/btrzpay/square.js +12 -3
- package/src/endpoints/btrzpay/stripe-terminals.js +9 -3
- package/src/endpoints/btrzpay/terminalPayments.js +14 -4
- package/src/endpoints/inventory/document-types.js +2 -1
- package/src/endpoints/inventory/products.js +1 -0
- package/src/endpoints/operations/movements.js +7 -2
- package/src/endpoints/operations/pago-express.js +9 -3
- package/src/endpoints/operations/parcels.js +3 -1
- package/src/endpoints/sales/cancellations.js +31 -8
- package/test/all.test.js +218 -0
- package/test/client.test.js +58 -44
- package/test/endpoints/accounts/application-settings.test.js +2 -2
- package/test/endpoints/accounts/applications.test.js +2 -2
- package/test/endpoints/accounts/current-shifts.test.js +2 -2
- package/test/endpoints/accounts/customers.js +17 -17
- package/test/endpoints/accounts/domains.test.js +6 -8
- package/test/endpoints/accounts/exchange-rates.test.js +3 -3
- package/test/endpoints/accounts/exchange-receipts.test.js +3 -3
- package/test/endpoints/accounts/images.test.js +2 -2
- package/test/endpoints/accounts/interline.test.js +10 -12
- package/test/endpoints/accounts/network.test.js +3 -5
- package/test/endpoints/accounts/people-lookups.test.js +13 -13
- package/test/endpoints/accounts/print-templates.test.js +3 -3
- package/test/endpoints/accounts/printers.test.js +2 -2
- package/test/endpoints/accounts/tokens.js +2 -2
- package/test/endpoints/accounts/trusted-machines.test.js +2 -2
- package/test/endpoints/accounts/websales-config.test.js +47 -50
- package/test/endpoints/btrzpay/carpointe.tests.js +2 -2
- package/test/endpoints/btrzpay/datalogicPayments.tests.js +2 -2
- package/test/endpoints/btrzpay/datalogicReferenceNumber.tests.js +2 -2
- package/test/endpoints/btrzpay/oxxoPayments.tests.js +2 -2
- package/test/endpoints/btrzpay/oxxoToken.tests.js +2 -2
- package/test/endpoints/btrzpay/payment-methods.test.js +3 -3
- package/test/endpoints/btrzpay/payments.tests.js +6 -6
- package/test/endpoints/btrzpay/reference-numbers.test.js +5 -5
- package/test/endpoints/btrzpay/referenced-payments.test.js +2 -2
- package/test/endpoints/btrzpay/square.tests.js +2 -2
- package/test/endpoints/btrzpay/terminalPayments.tests.js +2 -2
- package/test/endpoints/endpoints_helpers.test.js +28 -24
- package/test/endpoints/inventory/amenities.test.js +20 -20
- package/test/endpoints/inventory/amenity-groups.test.js +15 -15
- package/test/endpoints/inventory/bare-routes.test.js +2 -2
- package/test/endpoints/inventory/brands.test.js +9 -9
- package/test/endpoints/inventory/bundle-fares.test.js +10 -11
- package/test/endpoints/inventory/bundles.test.js +9 -9
- package/test/endpoints/inventory/companies.test.js +6 -6
- package/test/endpoints/inventory/custom-content.test.js +4 -4
- package/test/endpoints/inventory/custom-fields.test.js +2 -2
- package/test/endpoints/inventory/document-types.test.js +2 -2
- package/test/endpoints/inventory/fare-classes.test.js +10 -10
- package/test/endpoints/inventory/fares.test.js +14 -16
- package/test/endpoints/inventory/fees.test.js +14 -15
- package/test/endpoints/inventory/filtered-trips-v2.test.js +5 -5
- package/test/endpoints/inventory/insurances.test.js +2 -2
- package/test/endpoints/inventory/insurancesCost.test.js +2 -2
- package/test/endpoints/inventory/journey-prices.test.js +13 -15
- package/test/endpoints/inventory/labels.test.js +2 -2
- package/test/endpoints/inventory/marital-status.test.js +2 -2
- package/test/endpoints/inventory/mit-terminal-settings.test.js +2 -2
- package/test/endpoints/inventory/mit-terminals.test.js +7 -7
- package/test/endpoints/inventory/operating-companies.test.js +14 -14
- package/test/endpoints/inventory/operation-messages.test.js +10 -10
- package/test/endpoints/inventory/parcel-zones.test.js +12 -13
- package/test/endpoints/inventory/payment-terminals.test.js +7 -7
- package/test/endpoints/inventory/prisma-terminals.test.js +2 -2
- package/test/endpoints/inventory/products.test.js +25 -20
- package/test/endpoints/inventory/promos.test.js +50 -50
- package/test/endpoints/inventory/seatclasses.test.js +2 -2
- package/test/endpoints/inventory/seatfees.test.js +6 -6
- package/test/endpoints/inventory/seatmaps.test.js +7 -7
- package/test/endpoints/inventory/segments-information.test.js +2 -2
- package/test/endpoints/inventory/service-numbers.test.js +6 -6
- package/test/endpoints/inventory/service-types.test.js +7 -7
- package/test/endpoints/inventory/shift-settings.test.js +2 -2
- package/test/endpoints/inventory/ssrs.test.js +10 -11
- package/test/endpoints/inventory/stations-zones.test.js +8 -9
- package/test/endpoints/inventory/stations.test.js +2 -2
- package/test/endpoints/inventory/travel-routes.test.js +2 -2
- package/test/endpoints/inventory/traveller-car-types.test.js +8 -8
- package/test/endpoints/inventory/traveller-card-providers-types.test.js +2 -2
- package/test/endpoints/inventory/traveller-card-providers.test.js +7 -7
- package/test/endpoints/inventory/vehicles.test.js +2 -2
- package/test/endpoints/inventory/zone-price-overages.test.js +2 -2
- package/test/endpoints/inventory/zone-prices.test.js +2 -2
- package/test/endpoints/invoices/dlink.test.js +2 -2
- package/test/endpoints/invoices/gti.test.js +2 -2
- package/test/endpoints/invoices/infile.test.js +2 -2
- package/test/endpoints/invoices/infileJson.test.js +2 -2
- package/test/endpoints/invoices/providers.test.js +4 -4
- package/test/endpoints/invoices/providersSequences.test.js +2 -2
- package/test/endpoints/invoices/system.test.js +2 -2
- package/test/endpoints/loyalty/movements.test.js +11 -11
- package/test/endpoints/loyalty/programs.test.js +21 -21
- package/test/endpoints/notifications/customers.test.js +6 -6
- package/test/endpoints/notifications/external-customers.test.js +10 -10
- package/test/endpoints/notifications/manifet-notifications.test.js +3 -3
- package/test/endpoints/notifications/notify.test.js +5 -5
- package/test/endpoints/notifications/orders-rules-validations.test.js +5 -6
- package/test/endpoints/notifications/pdfs.test.js +4 -4
- package/test/endpoints/notifications/printed-tickets.test.js +17 -18
- package/test/endpoints/notifications/short-urls.test.js +9 -9
- package/test/endpoints/operations/applied_insurance.test.js +10 -14
- package/test/endpoints/operations/calendar_entries.test.js +8 -9
- package/test/endpoints/operations/cancellation_settings.test.js +2 -2
- package/test/endpoints/operations/loans.test.js +2 -2
- package/test/endpoints/operations/manifest.test.js +11 -9
- package/test/endpoints/operations/operations.test.js +42 -25
- package/test/endpoints/operations/parcel_manifests.test.js +3 -3
- package/test/endpoints/operations/parcels.test.js +27 -22
- package/test/endpoints/operations/passenger_check_in_info.test.js +2 -2
- package/test/endpoints/operations/redemption.test.js +2 -2
- package/test/endpoints/operations/sold-items-fulfillment.test.js +2 -2
- package/test/endpoints/operations/sold_items.test.js +3 -3
- package/test/endpoints/operations/tickets.test.js +4 -4
- package/test/endpoints/operations/transaction.test.js +12 -15
- package/test/endpoints/operations/transactions.test.js +11 -11
- package/test/endpoints/operations/transport_regulations.js +2 -4
- package/test/endpoints/operations/trip_change_info.test.js +9 -10
- package/test/endpoints/operations/vehicle-assignments.test.js +5 -7
- package/test/endpoints/operations/waitlists.test.js +3 -3
- package/test/endpoints/ratality/auth.test.js +5 -5
- package/test/endpoints/ratality/client.test.js +4 -4
- package/test/endpoints/ratality/integrations.test.js +15 -9
- package/test/endpoints/reports/custom-reports.test.js +12 -12
- package/test/endpoints/reports/email.test.js +3 -3
- package/test/endpoints/reports/report-types.test.js +6 -6
- package/test/endpoints/reports/trip-manifests.test.js +5 -6
- package/test/endpoints/sales/bundles.test.js +9 -10
- package/test/endpoints/sales/cart-promo.test.js +15 -16
- package/test/endpoints/sales/cart.test.js +7 -7
- package/test/endpoints/sales/check-in-info.test.js +3 -3
- package/test/endpoints/sales/custom-fields.test.js +10 -13
- package/test/endpoints/sales/flexpasses.test.js +2 -2
- package/test/endpoints/sales/git-certificates.test.js +10 -13
- package/test/endpoints/sales/order.test.js +19 -21
- package/test/endpoints/sales/payment-providers.test.js +14 -15
- package/test/endpoints/sales/redeemable-items.test.js +14 -15
- package/test/endpoints/sales/sync-entry.test.js +9 -11
- package/test/endpoints/sales/voucher.test.js +19 -17
- package/test/endpoints/seatmaps/access-ticket.test.js +6 -6
- package/test/endpoints/seatmaps/seat.test.js +6 -6
- package/test/endpoints/uploads/files.test.js +8 -7
- package/test/endpoints/uploads/images.test.js +8 -7
- package/test/endpoints/webhooks/subscriptions.test.js +27 -27
- package/test/endpoints/webhooks/undelivered.test.js +22 -22
- package/test/endpoints/webhooks/webhooks.test.js +7 -7
- package/test/node-test-globals.js +19 -0
- package/test/test-helpers.js +4 -4
- package/test-integration/all.test.js +63 -0
- package/test-integration/endpoints/accounts/current-shifts.test.js +4 -4
- package/test-integration/endpoints/accounts/docs.test.js +6 -6
- package/test-integration/endpoints/accounts/lexicons.test.js +42 -37
- package/test-integration/endpoints/accounts/shifts.test.js +5 -8
- package/test-integration/endpoints/accounts/users.test.js +4 -4
- package/test-integration/endpoints/btrzpay/customerCards.test.js +24 -48
- package/test-integration/endpoints/btrzpay/customers.test.js +20 -34
- package/test-integration/endpoints/btrzpay/payment-methods.test.js +34 -34
- package/test-integration/endpoints/btrzpay/payments.test.js +21 -21
- package/test-integration/endpoints/btrzpay/reference-numbers.test.js +15 -15
- package/test-integration/endpoints/btrzpay/referenced-payments.test.js +5 -5
- package/test-integration/endpoints/client.test.js +6 -10
- package/test-integration/endpoints/inventory/amenities.test.js +34 -34
- package/test-integration/endpoints/inventory/amenity-groups.test.js +30 -31
- package/test-integration/endpoints/inventory/bundle-fares.test.js +10 -12
- package/test-integration/endpoints/inventory/companies.test.js +7 -8
- package/test-integration/endpoints/inventory/countries.test.js +10 -12
- package/test-integration/endpoints/inventory/custom-fields.test.js +2 -2
- package/test-integration/endpoints/inventory/docs.test.js +5 -7
- package/test-integration/endpoints/inventory/fare-classes.test.js +12 -13
- package/test-integration/endpoints/inventory/fares.test.js +7 -9
- package/test-integration/endpoints/inventory/fees.test.js +8 -10
- package/test-integration/endpoints/inventory/filtered-trips.test.js +15 -12
- package/test-integration/endpoints/inventory/gift-certificate-definitions.test.js +5 -5
- package/test-integration/endpoints/inventory/insurances.test.js +36 -34
- package/test-integration/endpoints/inventory/items.js +10 -12
- package/test-integration/endpoints/inventory/journey-prices.test.js +11 -11
- package/test-integration/endpoints/inventory/parcel-zones.test.js +15 -18
- package/test-integration/endpoints/inventory/products.test.js +12 -14
- package/test-integration/endpoints/inventory/promos.test.js +46 -42
- package/test-integration/endpoints/inventory/routes.test.js +13 -15
- package/test-integration/endpoints/inventory/schedule-groups.test.js +23 -23
- package/test-integration/endpoints/inventory/ssrs.test.js +16 -11
- package/test-integration/endpoints/inventory/stations-zones.test.js +5 -6
- package/test-integration/endpoints/inventory/stations.test.js +17 -20
- package/test-integration/endpoints/inventory/trips.test.js +30 -16
- package/test-integration/endpoints/notifications/printed-tickets.test.js +2 -2
- package/test-integration/endpoints/operations/applied_insurance.test.js +9 -11
- package/test-integration/endpoints/operations/manifest.test.js +32 -34
- package/test-integration/endpoints/operations/parcel.test.js +36 -38
- package/test-integration/endpoints/operations/redemption.test.js +9 -12
- package/test-integration/endpoints/operations/segments.js +8 -10
- package/test-integration/endpoints/operations/tickets.test.js +11 -11
- package/test-integration/endpoints/operations/transaction.test.js +1 -1
- package/test-integration/endpoints/operations/transactions.test.js +2 -2
- package/test-integration/endpoints/operations/trip_change_info.test.js +11 -13
- package/test-integration/endpoints/reports/custom-reports.test.js +21 -21
- package/test-integration/endpoints/reports/report-types.test.js +22 -22
- package/test-integration/endpoints/sales/bundles.test.js +5 -5
- package/test-integration/endpoints/sales/cart-promo.test.js +17 -32
- package/test-integration/endpoints/sales/cart.test.js +45 -51
- package/test-integration/endpoints/sales/check-in-info.test.js +2 -2
- package/test-integration/endpoints/sales/custom-fields.test.js +8 -10
- package/test-integration/endpoints/sales/flexpasses.test.js +2 -2
- package/test-integration/endpoints/sales/gift-certificates.test.js +14 -18
- package/test-integration/endpoints/sales/order.test.js +42 -50
- package/test-integration/endpoints/sales/payment-providers.test.js +7 -9
- package/test-integration/endpoints/sales/redeemable-items.test.js +17 -19
- package/test-integration/endpoints/sales/voucher.test.js +12 -14
- package/test-integration/endpoints/seatmaps/access-ticket.test.js +7 -9
- package/test-integration/endpoints/seatmaps/seat.test.js +7 -9
- package/test-integration/endpoints/uploads/files.test.js +14 -14
- package/test-integration/endpoints/uploads/images.test.js +3 -5
- package/test-integration/ports.js +4 -4
- package/test-integration/test-integration-helpers.js +13 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const assert = require("node:assert/strict");
|
|
2
2
|
const {axiosMock} = require("./../../test-helpers.js");
|
|
3
3
|
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
4
4
|
|
|
@@ -23,15 +23,15 @@ describe("notifications/short-urls", () => {
|
|
|
23
23
|
return [403];
|
|
24
24
|
});
|
|
25
25
|
return api.notifications.shortUrls.create({token, jwtToken, urlData}).then((res) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
assert.deepStrictEqual(res.status, 200);
|
|
27
|
+
assert.deepStrictEqual(res.data.shortUrl, "https://btrz.ca/u/abc123");
|
|
28
|
+
assert.deepStrictEqual(res.data.shortId, "abc123");
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
it("should POST create short URL with only fullUrl", () => {
|
|
33
33
|
const urlData = {fullUrl: "https://example.com/only"};
|
|
34
|
-
axiosMock.onPost("/short-urls").reply(({
|
|
34
|
+
axiosMock.onPost("/short-urls").reply(({_headers, data}) => {
|
|
35
35
|
const body = JSON.parse(data);
|
|
36
36
|
if (body.urlData && body.urlData.fullUrl === urlData.fullUrl && !body.urlData.method) {
|
|
37
37
|
return [200, {shortUrl: "https://btrz.ca/u/xyz", shortId: "xyz", fullUrl: urlData.fullUrl, createdAt: {}}];
|
|
@@ -39,8 +39,8 @@ describe("notifications/short-urls", () => {
|
|
|
39
39
|
return [400];
|
|
40
40
|
});
|
|
41
41
|
return api.notifications.shortUrls.create({token, jwtToken, urlData}).then((res) => {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
assert.deepStrictEqual(res.status, 200);
|
|
43
|
+
assert.deepStrictEqual(res.data.fullUrl, "https://example.com/only");
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
46
|
|
|
@@ -52,8 +52,8 @@ describe("notifications/short-urls", () => {
|
|
|
52
52
|
return [401];
|
|
53
53
|
});
|
|
54
54
|
return api.notifications.shortUrls.getByShortId({token, shortId: "V1StGXR8_Z5j", maxRedirects: 0}).then((res) => {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
assert.deepStrictEqual(res.status, 302);
|
|
56
|
+
assert.deepStrictEqual(res.headers.location || res.headers.Location, "https://example.com/target");
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
});
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
const {
|
|
2
|
-
const api = require("./../../../src/client").createApiClient({
|
|
3
|
-
const expect = require("chai").expect;
|
|
1
|
+
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
2
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
4
3
|
|
|
5
|
-
describe(
|
|
6
|
-
const token =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
afterEach(function() {
|
|
4
|
+
describe("operations/applied_insurance", () => {
|
|
5
|
+
const token = "I owe you a token";
|
|
6
|
+
|
|
7
|
+
afterEach(() => {
|
|
10
8
|
axiosMock.reset();
|
|
11
9
|
});
|
|
12
10
|
|
|
13
|
-
it("should get all parcel by trxId",
|
|
11
|
+
it("should get all parcel by trxId", () => {
|
|
14
12
|
const trxId = "trxId1";
|
|
15
|
-
axiosMock.onGet(
|
|
16
|
-
return api.operations.appliedInsurance.all({
|
|
13
|
+
axiosMock.onGet("/appliedInsurances").reply(expectRequest({statusCode: 200, token}));
|
|
14
|
+
return api.operations.appliedInsurance.all({token, query: {trxId}});
|
|
17
15
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
16
|
+
});
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
const {
|
|
2
|
-
const api = require("./../../../src/client").createApiClient({
|
|
3
|
-
const expect = require("chai").expect;
|
|
1
|
+
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
2
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
4
3
|
|
|
5
|
-
describe(
|
|
6
|
-
const token =
|
|
4
|
+
describe("operations/calendar-entries", () => {
|
|
5
|
+
const token = "I owe you a token";
|
|
7
6
|
|
|
8
|
-
afterEach(
|
|
7
|
+
afterEach(() => {
|
|
9
8
|
axiosMock.reset();
|
|
10
9
|
});
|
|
11
10
|
|
|
12
|
-
it("should get all calendar entries",
|
|
13
|
-
axiosMock.onGet(
|
|
11
|
+
it("should get all calendar entries", () => {
|
|
12
|
+
axiosMock.onGet("/calendar-entries").reply(expectRequest({statusCode: 200, token}));
|
|
14
13
|
return api.operations.calendarEntries.all({token});
|
|
15
14
|
});
|
|
16
|
-
});
|
|
15
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const assert = require("node:assert/strict");
|
|
2
2
|
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
3
3
|
const api = require("./../../../src/client.js").createApiClient({
|
|
4
4
|
baseURL: "http://test.com"
|
|
@@ -46,7 +46,7 @@ describe("operations/cancellation-settings", () => {
|
|
|
46
46
|
allowCancellationAfterDeparture: true
|
|
47
47
|
};
|
|
48
48
|
axiosMock.onPut("/cancellation-settings").reply((config) => {
|
|
49
|
-
|
|
49
|
+
assert.deepStrictEqual(JSON.parse(config.data), data);
|
|
50
50
|
return [200, {}];
|
|
51
51
|
});
|
|
52
52
|
const response = await api.operations.cancellationSettings.update({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const {
|
|
2
2
|
axiosMock, expectRequest
|
|
3
|
-
} = require("./../../test-helpers");
|
|
4
|
-
const api = require("./../../../src/client").createApiClient({
|
|
3
|
+
} = require("./../../test-helpers.js");
|
|
4
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
5
5
|
|
|
6
6
|
describe("operations/loans", () => {
|
|
7
7
|
const token = "I owe you a token";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const assert = require("node:assert/strict");
|
|
2
2
|
const {
|
|
3
3
|
axiosMock, expectRequest
|
|
4
4
|
} = require("./../../test-helpers.js");
|
|
@@ -106,7 +106,7 @@ describe("operations/manifest", () => {
|
|
|
106
106
|
};
|
|
107
107
|
axiosMock.onPut(`/manifests/${manifestId}/comments`).reply(expectRequest({statusCode: 201, token, jwtToken}));
|
|
108
108
|
const call = await api.operations.manifest.updateComment({token, jwtToken, manifestId, data, query});
|
|
109
|
-
|
|
109
|
+
assert.deepStrictEqual(call.config.params, query);
|
|
110
110
|
return call;
|
|
111
111
|
});
|
|
112
112
|
|
|
@@ -127,7 +127,7 @@ describe("operations/manifest", () => {
|
|
|
127
127
|
};
|
|
128
128
|
axiosMock.onPut(`/manifests/${manifestId}/status`).reply(expectRequest({statusCode: 201, token, jwtToken}));
|
|
129
129
|
const call = await api.operations.manifest.updateStatus({token, jwtToken, manifestId, data, query});
|
|
130
|
-
|
|
130
|
+
assert.deepStrictEqual(call.config.params, query);
|
|
131
131
|
return call;
|
|
132
132
|
});
|
|
133
133
|
|
|
@@ -148,7 +148,7 @@ describe("operations/manifest", () => {
|
|
|
148
148
|
|
|
149
149
|
axiosMock.onPut("/manifests/status").reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
150
150
|
const call = await api.operations.manifest.statusBulkUpdate({token, jwtToken, data});
|
|
151
|
-
|
|
151
|
+
assert.deepStrictEqual(JSON.parse(call.config.data), data);
|
|
152
152
|
return call;
|
|
153
153
|
});
|
|
154
154
|
|
|
@@ -171,7 +171,7 @@ describe("operations/manifest", () => {
|
|
|
171
171
|
};
|
|
172
172
|
axiosMock.onPost(`/manifests/${manifestId}/capacity-exceptions`).reply(expectRequest({statusCode: 201, token, jwtToken}));
|
|
173
173
|
const call = await api.operations.manifest.addCapacityException({token, jwtToken, manifestId, data, query});
|
|
174
|
-
|
|
174
|
+
assert.deepStrictEqual(call.config.params, query);
|
|
175
175
|
return call;
|
|
176
176
|
});
|
|
177
177
|
|
|
@@ -204,7 +204,7 @@ describe("operations/manifest", () => {
|
|
|
204
204
|
};
|
|
205
205
|
axiosMock.onPost(`/manifests/${manifestId}/users`).reply(expectRequest({statusCode: 201, token, jwtToken}));
|
|
206
206
|
const call = await api.operations.manifest.addUser({token, jwtToken, manifestId, data, query});
|
|
207
|
-
|
|
207
|
+
assert.deepStrictEqual(call.config.params, query);
|
|
208
208
|
return call;
|
|
209
209
|
});
|
|
210
210
|
|
|
@@ -305,9 +305,11 @@ describe("operations/manifest/legs/tickets/noshow", () => {
|
|
|
305
305
|
const ticketId = "idTicket";
|
|
306
306
|
|
|
307
307
|
axiosMock.onPut(`/manifests/${manifestId}/legs/${legFromId}/tickets/${ticketId}/noshow`).reply((config) => {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
assert.ok([manifestId, legFromId, ticketId].some((item) => {
|
|
309
|
+
return config.url.includes(item);
|
|
310
|
+
}));
|
|
311
|
+
assert.deepStrictEqual(config.headers.authorization, `Bearer ${jwtToken}`);
|
|
312
|
+
assert.deepStrictEqual(config.headers["x-api-key"], token);
|
|
311
313
|
return [200, {}];
|
|
312
314
|
});
|
|
313
315
|
return api.operations.manifest.legs.tickets.noshow({
|
|
@@ -1,49 +1,66 @@
|
|
|
1
|
-
const {
|
|
2
|
-
const api = require("./../../../src/client").createApiClient({
|
|
1
|
+
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
2
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
3
3
|
|
|
4
|
-
describe(
|
|
5
|
-
const token =
|
|
6
|
-
const jwtToken =
|
|
4
|
+
describe("operations/segments", () => {
|
|
5
|
+
const token = "I owe you a token";
|
|
6
|
+
const jwtToken = "I owe you a JWT token";
|
|
7
7
|
|
|
8
|
-
afterEach(
|
|
8
|
+
afterEach(() => {
|
|
9
9
|
axiosMock.reset();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
it("should get segments for product and ticket",
|
|
13
|
-
const productId = "productId1"
|
|
14
|
-
|
|
12
|
+
it("should get segments for product and ticket", () => {
|
|
13
|
+
const productId = "productId1";
|
|
14
|
+
const ticketId = "ticketId1";
|
|
15
15
|
axiosMock.onGet(`/products/${productId}/segments/${ticketId}`)
|
|
16
|
-
.reply(expectRequest({
|
|
17
|
-
return api.operations.segments.all({
|
|
16
|
+
.reply(expectRequest({statusCode: 200, token}));
|
|
17
|
+
return api.operations.segments.all({token, jwtToken, productId, ticketId});
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
describe("operations/pagoExpress",
|
|
21
|
+
describe("operations/pagoExpress", () => {
|
|
22
22
|
const token = "I owe you a token";
|
|
23
23
|
const jwtToken = "I owe you a JWT token";
|
|
24
24
|
|
|
25
|
-
afterEach(
|
|
25
|
+
afterEach(() => {
|
|
26
26
|
axiosMock.reset();
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
it("should post pago-express info",
|
|
30
|
-
const payment = {
|
|
29
|
+
it("should post pago-express info", () => {
|
|
30
|
+
const payment = {
|
|
31
|
+
folio: "10305108982123541235",
|
|
32
|
+
id_terminal: 45875263254987452135,
|
|
33
|
+
local_date: "18/06/1988 15:04:20",
|
|
34
|
+
trx_no: 12345
|
|
35
|
+
};
|
|
31
36
|
axiosMock.onPost("/pago-express/info")
|
|
32
|
-
.reply(expectRequest({
|
|
33
|
-
return api.operations.pagoExpress.info({
|
|
37
|
+
.reply(expectRequest({statusCode: 200, token, jwtToken, body: {payment}}));
|
|
38
|
+
return api.operations.pagoExpress.info({token, jwtToken, payment});
|
|
34
39
|
});
|
|
35
40
|
|
|
36
|
-
it("should post pago-express pay",
|
|
37
|
-
const payment = {
|
|
41
|
+
it("should post pago-express pay", () => {
|
|
42
|
+
const payment = {
|
|
43
|
+
folio: "10305108982123541235",
|
|
44
|
+
id_terminal: 45875263254987452135,
|
|
45
|
+
local_date: "18/06/1988 15:04:20",
|
|
46
|
+
trx_no: 12345,
|
|
47
|
+
amount: "999.00"
|
|
48
|
+
};
|
|
38
49
|
axiosMock.onPost("/pago-express/pay")
|
|
39
|
-
.reply(expectRequest({
|
|
40
|
-
return api.operations.pagoExpress.pay({
|
|
50
|
+
.reply(expectRequest({statusCode: 200, token, jwtToken, body: {payment}}));
|
|
51
|
+
return api.operations.pagoExpress.pay({token, jwtToken, payment});
|
|
41
52
|
});
|
|
42
53
|
|
|
43
|
-
it("should post pago-express reverse",
|
|
44
|
-
const reversePayment = {
|
|
54
|
+
it("should post pago-express reverse", () => {
|
|
55
|
+
const reversePayment = {
|
|
56
|
+
folio: "10305108982123541235",
|
|
57
|
+
id_terminal: 45875263254987452135,
|
|
58
|
+
local_date: "18/06/1988 15:04:20",
|
|
59
|
+
trx_no: 12345,
|
|
60
|
+
amount: "999.00"
|
|
61
|
+
};
|
|
45
62
|
axiosMock.onPost("/pago-express/reverse")
|
|
46
|
-
.reply(expectRequest({
|
|
47
|
-
return api.operations.pagoExpress.reverse({
|
|
63
|
+
.reply(expectRequest({statusCode: 200, token, jwtToken, body: {reversePayment}}));
|
|
64
|
+
return api.operations.pagoExpress.reverse({token, jwtToken, reversePayment});
|
|
48
65
|
});
|
|
49
66
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const {axiosMock, expectRequest} = require("./../../test-helpers");
|
|
2
|
-
const api = require("./../../../src/client").createApiClient({baseURL: "http://test.com"});
|
|
1
|
+
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
2
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
3
3
|
|
|
4
4
|
describe("operations/parcels-manifests", () => {
|
|
5
5
|
const token = "I owe you a token";
|
|
@@ -90,5 +90,5 @@ describe("operations/parcels-manifests", () => {
|
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
//parcels-manifests
|
|
93
|
+
// parcels-manifests
|
|
94
94
|
});
|
|
@@ -1,43 +1,48 @@
|
|
|
1
|
-
const {
|
|
2
|
-
const api = require("./../../../src/client").createApiClient({
|
|
3
|
-
const expect = require("chai").expect;
|
|
1
|
+
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
2
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
4
3
|
|
|
5
|
-
describe(
|
|
6
|
-
const token =
|
|
7
|
-
const jwtToken =
|
|
8
|
-
|
|
9
|
-
afterEach(
|
|
4
|
+
describe("operations/parcels", () => {
|
|
5
|
+
const token = "I owe you a token";
|
|
6
|
+
const jwtToken = "I owe you a JWT token";
|
|
7
|
+
|
|
8
|
+
afterEach(() => {
|
|
10
9
|
axiosMock.reset();
|
|
11
10
|
});
|
|
12
11
|
|
|
13
|
-
it("should get a parcel by id",
|
|
12
|
+
it("should get a parcel by id", () => {
|
|
14
13
|
const parcelId = "parcelId1";
|
|
15
|
-
axiosMock.onGet(`/parcels/${parcelId}`).reply(expectRequest({
|
|
16
|
-
return api.operations.parcel.get({
|
|
14
|
+
axiosMock.onGet(`/parcels/${parcelId}`).reply(expectRequest({statusCode: 200, token}));
|
|
15
|
+
return api.operations.parcel.get({token, id: parcelId});
|
|
17
16
|
});
|
|
18
17
|
|
|
19
|
-
it("should get all parcel by trxId",
|
|
18
|
+
it("should get all parcel by trxId", () => {
|
|
20
19
|
const trxId = "trxId1";
|
|
21
|
-
axiosMock.onGet(
|
|
22
|
-
return api.operations.parcel.all({
|
|
20
|
+
axiosMock.onGet("/parcels").reply(expectRequest({statusCode: 200, token}));
|
|
21
|
+
return api.operations.parcel.all({token, query: {trxId}});
|
|
23
22
|
});
|
|
24
23
|
|
|
25
|
-
it("should add scan to parcel",
|
|
24
|
+
it("should add scan to parcel", () => {
|
|
26
25
|
const parcelId = "parcelId1";
|
|
27
|
-
axiosMock.onPost(`/parcels/${parcelId}/scans`).reply(expectRequest({
|
|
28
|
-
return api.operations.parcel.addScan({
|
|
26
|
+
axiosMock.onPost(`/parcels/${parcelId}/scans`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
27
|
+
return api.operations.parcel.addScan({
|
|
28
|
+
jwtToken,
|
|
29
|
+
token,
|
|
30
|
+
id: parcelId,
|
|
31
|
+
operationType: "deliver",
|
|
32
|
+
locationData: {latitude: 0, longitude: 0}
|
|
33
|
+
});
|
|
29
34
|
});
|
|
30
35
|
|
|
31
|
-
it("should add a comment to parcel",
|
|
36
|
+
it("should add a comment to parcel", () => {
|
|
32
37
|
const parcelId = "parcelId1";
|
|
33
|
-
axiosMock.onPost(`/parcels/${parcelId}/user-comments`).reply(expectRequest({
|
|
34
|
-
return api.operations.parcel.addComment({
|
|
38
|
+
axiosMock.onPost(`/parcels/${parcelId}/user-comments`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
39
|
+
return api.operations.parcel.addComment({jwtToken, token, id: parcelId, comment: "A comment"});
|
|
35
40
|
});
|
|
36
41
|
|
|
37
42
|
it("should delete a comment from a parcel", () => {
|
|
38
43
|
const parcelId = "parcelId1";
|
|
39
44
|
const commentId = "commentId1";
|
|
40
|
-
axiosMock.onDelete(`/parcels/${parcelId}/user-comments/${commentId}`).reply(expectRequest({
|
|
41
|
-
return api.operations.parcel.deleteComment({
|
|
45
|
+
axiosMock.onDelete(`/parcels/${parcelId}/user-comments/${commentId}`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
46
|
+
return api.operations.parcel.deleteComment({jwtToken, token, id: parcelId, commentId});
|
|
42
47
|
});
|
|
43
48
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const {axiosMock, expectRequest} = require("./../../test-helpers");
|
|
2
|
-
const api = require("./../../../src/client").createApiClient({baseURL: "http://test.com"});
|
|
1
|
+
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
2
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
3
3
|
|
|
4
4
|
describe("operations/passenger-check-in-info", () => {
|
|
5
5
|
const token = "I owe you a token";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const {axiosMock, expectRequest} = require("./../../test-helpers");
|
|
2
|
-
const api = require("./../../../src/client").createApiClient({baseURL: "http://test.com"});
|
|
1
|
+
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
2
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
3
3
|
|
|
4
4
|
describe("operations/redemptions", () => {
|
|
5
5
|
const token = "I owe you a token";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
const
|
|
2
|
+
const assert = require("node:assert/strict");
|
|
3
3
|
const {axiosMock, expectRequest} = require("../../test-helpers.js");
|
|
4
4
|
const api = require("../../../src/client.js")
|
|
5
5
|
.createApiClient({baseURL: "http://test.com"});
|
|
@@ -26,7 +26,7 @@ describe("operations/sold-items/fulfillment", () => {
|
|
|
26
26
|
jwtToken,
|
|
27
27
|
query
|
|
28
28
|
}).then((httpResponse) => {
|
|
29
|
-
|
|
29
|
+
assert.deepStrictEqual(httpResponse.status, 200);
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
const
|
|
2
|
+
const assert = require("node:assert/strict");
|
|
3
3
|
const {axiosMock, expectRequest} = require("../../test-helpers.js");
|
|
4
4
|
const api = require("../../../src/client.js")
|
|
5
5
|
.createApiClient({baseURL: "http://test.com"});
|
|
@@ -26,7 +26,7 @@ describe("operations/sold-items", () => {
|
|
|
26
26
|
jwtToken,
|
|
27
27
|
query
|
|
28
28
|
}).then((httpResponse) => {
|
|
29
|
-
|
|
29
|
+
assert.deepStrictEqual(httpResponse.status, 200);
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
|
|
@@ -43,7 +43,7 @@ describe("operations/sold-items", () => {
|
|
|
43
43
|
jwtToken,
|
|
44
44
|
soldItemId
|
|
45
45
|
}).then((httpResponse) => {
|
|
46
|
-
|
|
46
|
+
assert.deepStrictEqual(httpResponse.status, 200);
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable func-names */
|
|
2
2
|
/* eslint-disable prefer-arrow-callback */
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const assert = require("node:assert/strict");
|
|
5
5
|
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
6
6
|
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
7
7
|
|
|
@@ -32,7 +32,7 @@ describe("operations/tickets", () => {
|
|
|
32
32
|
axiosMock.onGet(`/tickets/${ticketId}/companion-tickets`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
33
33
|
return api.operations.tickets.companionTickets({jwtToken, token, ticketId})
|
|
34
34
|
.then((response) => {
|
|
35
|
-
|
|
35
|
+
assert.deepStrictEqual(response.status, 200);
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
|
|
@@ -58,7 +58,7 @@ describe("operations/tickets", () => {
|
|
|
58
58
|
jwtToken,
|
|
59
59
|
data
|
|
60
60
|
}).then((httpResponse) => {
|
|
61
|
-
|
|
61
|
+
assert.deepStrictEqual(httpResponse.status, 200);
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
|
|
@@ -81,7 +81,7 @@ describe("operations/tickets", () => {
|
|
|
81
81
|
jwtToken,
|
|
82
82
|
data
|
|
83
83
|
}).then((httpResponse) => {
|
|
84
|
-
|
|
84
|
+
assert.deepStrictEqual(httpResponse.status, 200);
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
});
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
const {
|
|
2
|
-
const api = require("./../../../src/client").createApiClient({
|
|
3
|
-
const expect = require("chai").expect;
|
|
1
|
+
const {axiosMock, expectRequest} = require("./../../test-helpers.js");
|
|
2
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
4
3
|
|
|
5
|
-
describe(
|
|
6
|
-
const token =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
afterEach(function() {
|
|
4
|
+
describe("operations/transaction", () => {
|
|
5
|
+
const token = "I owe you a token";
|
|
6
|
+
|
|
7
|
+
afterEach(() => {
|
|
10
8
|
axiosMock.reset();
|
|
11
9
|
});
|
|
12
10
|
|
|
13
|
-
it("should get a transaction by id",
|
|
14
|
-
const transactionId = "transactionId1"
|
|
15
|
-
|
|
16
|
-
axiosMock.onGet(`/transaction/${transactionId}?providerId=${providerId}`).reply(expectRequest({
|
|
17
|
-
return api.operations.transaction.get({
|
|
11
|
+
it("should get a transaction by id", () => {
|
|
12
|
+
const transactionId = "transactionId1";
|
|
13
|
+
const providerId = "providerId";
|
|
14
|
+
axiosMock.onGet(`/transaction/${transactionId}?providerId=${providerId}`).reply(expectRequest({statusCode: 200, token}));
|
|
15
|
+
return api.operations.transaction.get({token, id: transactionId, providerId});
|
|
18
16
|
});
|
|
19
|
-
|
|
20
|
-
});
|
|
17
|
+
});
|
|
@@ -9,7 +9,7 @@ describe("operations/transactions", function () {
|
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
11
|
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com", internalAuthTokenProvider});
|
|
12
|
-
const
|
|
12
|
+
const assert = require("node:assert/strict");
|
|
13
13
|
const token = "validToken";
|
|
14
14
|
const jwtToken = "validJWTtoken";
|
|
15
15
|
|
|
@@ -22,7 +22,7 @@ describe("operations/transactions", function () {
|
|
|
22
22
|
axiosMock.onGet(`/transactions/${transactionId}`).reply(expectRequest({statusCode: 200, token}));
|
|
23
23
|
return api.operations.transactions.get({jwtToken, token, trxId: transactionId})
|
|
24
24
|
.then((response) => {
|
|
25
|
-
|
|
25
|
+
assert.deepStrictEqual(response.status, 200);
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
|
|
@@ -44,7 +44,7 @@ describe("operations/transactions", function () {
|
|
|
44
44
|
}
|
|
45
45
|
})
|
|
46
46
|
.then((response) => {
|
|
47
|
-
|
|
47
|
+
assert.deepStrictEqual(response.status, 200);
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -53,7 +53,7 @@ describe("operations/transactions", function () {
|
|
|
53
53
|
axiosMock.onGet("/transactions").reply(expectRequest({statusCode: 200, token}));
|
|
54
54
|
return api.operations.transactions.all({jwtToken, token, trxId: transactionId})
|
|
55
55
|
.then((response) => {
|
|
56
|
-
|
|
56
|
+
assert.deepStrictEqual(response.status, 200);
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
|
|
@@ -62,7 +62,7 @@ describe("operations/transactions", function () {
|
|
|
62
62
|
axiosMock.onGet(`/transactions/${transactionId}/tickets`).reply(expectRequest({statusCode: 200, token}));
|
|
63
63
|
return api.operations.transactions.getTickets({jwtToken, token, trxId: transactionId})
|
|
64
64
|
.then((response) => {
|
|
65
|
-
|
|
65
|
+
assert.deepStrictEqual(response.status, 200);
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
|
|
@@ -71,7 +71,7 @@ describe("operations/transactions", function () {
|
|
|
71
71
|
axiosMock.onGet(`/transactions/${transactionId}/applied-insurance`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
72
72
|
return api.operations.transactions.appliedInsurance({jwtToken, token, trxId: transactionId})
|
|
73
73
|
.then((response) => {
|
|
74
|
-
|
|
74
|
+
assert.deepStrictEqual(response.status, 200);
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
|
|
@@ -81,7 +81,7 @@ describe("operations/transactions", function () {
|
|
|
81
81
|
axiosMock.onGet(`/transactions/${transactionId}/companion-tickets`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
82
82
|
return api.operations.transactions.companionTickets({jwtToken, token, transactionId, ticketIds})
|
|
83
83
|
.then((response) => {
|
|
84
|
-
|
|
84
|
+
assert.deepStrictEqual(response.status, 200);
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
|
|
@@ -90,7 +90,7 @@ describe("operations/transactions", function () {
|
|
|
90
90
|
axiosMock.onGet(`/transactions/${transactionId}/cancellable-items`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
91
91
|
return api.operations.transactions.cancellableItems({jwtToken, token, transactionId})
|
|
92
92
|
.then((response) => {
|
|
93
|
-
|
|
93
|
+
assert.deepStrictEqual(response.status, 200);
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
96
|
|
|
@@ -103,7 +103,7 @@ describe("operations/transactions", function () {
|
|
|
103
103
|
jwtToken, token, trxId: transactionId, paymentResult
|
|
104
104
|
})
|
|
105
105
|
.then((response) => {
|
|
106
|
-
|
|
106
|
+
assert.deepStrictEqual(response.status, 200);
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
109
|
|
|
@@ -175,7 +175,7 @@ describe("operations/transactions", function () {
|
|
|
175
175
|
jwtToken, token, transactionId, invoice
|
|
176
176
|
})
|
|
177
177
|
.then((response) => {
|
|
178
|
-
|
|
178
|
+
assert.deepStrictEqual(response.status, 200);
|
|
179
179
|
});
|
|
180
180
|
});
|
|
181
181
|
|
|
@@ -190,7 +190,7 @@ describe("operations/transactions", function () {
|
|
|
190
190
|
jwtToken, token, transactionId, creditNote
|
|
191
191
|
})
|
|
192
192
|
.then((response) => {
|
|
193
|
-
|
|
193
|
+
assert.deepStrictEqual(response.status, 200);
|
|
194
194
|
});
|
|
195
195
|
});
|
|
196
196
|
});
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
expect
|
|
3
|
-
} = require("chai");
|
|
1
|
+
const assert = require("node:assert/strict");
|
|
4
2
|
const {
|
|
5
3
|
axiosMock,
|
|
6
4
|
expectRequest
|
|
@@ -29,7 +27,7 @@ describe("operations/transport-regulations", () => {
|
|
|
29
27
|
jwtToken,
|
|
30
28
|
data
|
|
31
29
|
}).then((httpResponse) => {
|
|
32
|
-
|
|
30
|
+
assert.deepStrictEqual(httpResponse.status, 200);
|
|
33
31
|
});
|
|
34
32
|
});
|
|
35
33
|
});
|