From c3f31c4d2a94d581797106f5e23ded031d0a12d7 Mon Sep 17 00:00:00 2001 From: sbriat Date: Thu, 13 Jul 2023 09:04:54 +0200 Subject: [PATCH] repositories integration tests --- .../tests/integration/username.repository.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/authentication/tests/integration/username.repository.spec.ts b/src/modules/authentication/tests/integration/username.repository.spec.ts index 55ea75a..18eb06a 100644 --- a/src/modules/authentication/tests/integration/username.repository.spec.ts +++ b/src/modules/authentication/tests/integration/username.repository.spec.ts @@ -74,7 +74,7 @@ describe('UsernameRepository', () => { }); }); - describe('findOne', () => { + describe('findByName', () => { it('should return a Username', async () => { await prismaService.username.create({ data: { @@ -84,9 +84,9 @@ describe('UsernameRepository', () => { }, }); - const username = await usernameRepository.findOne({ - username: 'john.doe@email.com', - }); + const username = await usernameRepository.findByName( + 'john.doe@email.com', + ); expect(username.id).toBe('john.doe@email.com'); }); @@ -184,7 +184,7 @@ describe('UsernameRepository', () => { const toDelete: UsernameEntity = await UsernameEntity.create( createUsernameProps, ); - await usernameRepository.delete(toDelete); + await usernameRepository.deleteUsername(toDelete); const count = await prismaService.username.count(); expect(count).toBe(0);