diff --git a/src/users/controllers/userRegistry.controller.spec.ts b/src/users/controllers/userRegistry.controller.spec.ts index 64a6db269738868c0e04ce7e16c2eff0b111df51..82bc6afb635649af644b68c14945992befc77c52 100644 --- a/src/users/controllers/userRegistry.controller.spec.ts +++ b/src/users/controllers/userRegistry.controller.spec.ts @@ -18,7 +18,6 @@ describe('UserRegistryController', () => { countAllUserRegistry: jest.fn(), findAllUserRegistry: jest.fn(), findUsersByNameEmployerOrJobsGroup: jest.fn(), - searchByNameAndSurname: jest.fn(), initUserRegistryIndex: jest.fn(), populateES: jest.fn(), }; diff --git a/src/users/services/userRegistry.service.spec.ts b/src/users/services/userRegistry.service.spec.ts index 7cca791d156e5fd927081caedf7a68f161e4f333..173acf5693d7903ebacc1501988a643d296d1a52 100644 --- a/src/users/services/userRegistry.service.spec.ts +++ b/src/users/services/userRegistry.service.spec.ts @@ -234,11 +234,5 @@ describe('userRegistryService', () => { mockUserRegistrySearchService.indexUserRegistry.mockResolvedValueOnce({}); expect(await userRegistryService.initUserRegistryIndex()).toBe(multipleUsers); }); - - it('should findAllUserRegistry with page number 1', async () => { - mockUserRegistrySearchService.search.mockResolvedValueOnce([multipleUsers[0]]); - - expect(await userRegistryService.searchByNameAndSurname('adm')).toStrictEqual([multipleUsers[0]]); - }); }); }); diff --git a/src/users/services/userRegistry.service.ts b/src/users/services/userRegistry.service.ts index 8d438cabe6c1113ebe912e93788c3b503eae9efd..245a1fe06a48ba2bfbafd16086ab5cae352e1f76 100644 --- a/src/users/services/userRegistry.service.ts +++ b/src/users/services/userRegistry.service.ts @@ -124,12 +124,6 @@ export class UserRegistryService { return { count: resultsWithFilter.length, docs: resultsWithFilter.splice(0, limit) }; } - // SEARCH - public async searchByNameAndSurname(searchString: string): Promise<UserRegistrySearchBody[]> { - this.logger.debug('searchByNameAndSurname'); - return this.userRegistrySearchService.search(searchString); - } - public async initUserRegistryIndex() { Logger.log('Reset users indexes'); await this.userRegistrySearchService.dropIndex();