From aec960e135da7146c9aaa8fe377e3bbc42911e16 Mon Sep 17 00:00:00 2001 From: Yury Saukou Date: Mon, 9 Dec 2024 21:55:26 +0400 Subject: [PATCH] update tests --- .../useSelectedOrganizationVersion.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Organizations/OrganizationVersion/hooks/useSelectedOrganizationVersion/useSelectedOrganizationVersion.test.js b/src/Organizations/OrganizationVersion/hooks/useSelectedOrganizationVersion/useSelectedOrganizationVersion.test.js index 73809bb2..41d8130a 100644 --- a/src/Organizations/OrganizationVersion/hooks/useSelectedOrganizationVersion/useSelectedOrganizationVersion.test.js +++ b/src/Organizations/OrganizationVersion/hooks/useSelectedOrganizationVersion/useSelectedOrganizationVersion.test.js @@ -19,6 +19,7 @@ import { organizationAuditEvent } from 'fixtures'; import { useContactsByIds, useInterfacesByIds, + useTypes, } from '../../../../common/hooks'; import { useSelectedOrganizationVersion } from './useSelectedOrganizationVersion'; @@ -33,6 +34,7 @@ jest.mock('../../../../common/hooks', () => ({ ...jest.requireActual('../../../../common/hooks'), useContactsByIds: jest.fn(), useInterfacesByIds: jest.fn(), + useTypes: jest.fn(), })); const versionId = organizationAuditEvent.id; @@ -43,6 +45,7 @@ const contacts = [{ id: 'contact1' }]; const interfaces = [{ id: 'interface1' }]; const organization = { id: 'org1' }; const users = [{ id: 'user1', personal: { firstName: 'John', lastName: 'Doe' } }]; +const organizationTypes = [{ id: 'type-id', name: 'Type name' }]; const queryClient = new QueryClient(); const wrapper = ({ children }) => ( @@ -58,6 +61,7 @@ describe('useSelectedOrganizationVersion', () => { useUsersBatch.mockReturnValue({ users, isLoading: false }); useContactsByIds.mockReturnValue({ contacts, isLoading: false }); useInterfacesByIds.mockReturnValue({ interfaces, isLoading: false }); + useTypes.mockReturnValue({ organizationTypes, isLoading: false }); }); afterEach(() => {