From b18b98ac24969b6f154c19035217caa5d4649dfd Mon Sep 17 00:00:00 2001 From: Alisher Musurmonov Date: Thu, 21 Nov 2024 12:27:28 +0500 Subject: [PATCH] test: add test coverages --- lib/utils/api/api.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/utils/api/api.test.js b/lib/utils/api/api.test.js index 4dc5baad..552ad416 100644 --- a/lib/utils/api/api.test.js +++ b/lib/utils/api/api.test.js @@ -3,6 +3,7 @@ import { SEARCH_PARAMETER, } from '../../AcqList/constants'; import { + ACQUISITIONS_UNITS_API, LIMIT_MAX, LINES_API, ORDER_PIECES_API, @@ -11,6 +12,7 @@ import { VENDORS_API, } from '../../constants'; +import { fetchAcqUnitsByIds } from './fetchAcqUnitsByIds'; import { fetchOrderLines } from './fetchOrderLines'; import { fetchOrderLinesByIds } from './fetchOrderLinesByIds'; import { fetchOrders } from './fetchOrders'; @@ -110,4 +112,12 @@ describe('API utils', () => { expect(httpClient.get).toHaveBeenCalledWith(RECEIVING_TITLES_API, { searchParams }); }); }); + + describe('fetchAcqUnitsByIds', () => { + it('should fetch acquisitions units by ids', async () => { + await fetchAcqUnitsByIds(httpClient)(ids); + + expect(httpClient.get).toHaveBeenCalledWith(ACQUISITIONS_UNITS_API, { searchParams }); + }); + }); });