From d17a3b986764ee93503f82a0944a26662d1f3bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Chevalier?= Date: Thu, 4 May 2023 15:13:01 +0200 Subject: [PATCH] adding testing for find ad by uuid --- src/modules/ad/tests/unit/find-ad-by-uuid.usecase.spec.ts | 4 ++-- src/modules/ad/tests/unit/messager.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/ad/tests/unit/find-ad-by-uuid.usecase.spec.ts b/src/modules/ad/tests/unit/find-ad-by-uuid.usecase.spec.ts index f895c65..df3375b 100644 --- a/src/modules/ad/tests/unit/find-ad-by-uuid.usecase.spec.ts +++ b/src/modules/ad/tests/unit/find-ad-by-uuid.usecase.spec.ts @@ -50,7 +50,7 @@ describe('FindAdByUuidUseCase', () => { expect(findAdByUuidUseCase).toBeDefined(); }); describe('execute', () => { - it('should return a user', async () => { + it('should return an ad', async () => { const findAdByUuidRequest: FindAdByUuidRequest = new FindAdByUuidRequest(); findAdByUuidRequest.uuid = 'bb281075-1b98-4456-89d6-c643d3044a91'; @@ -59,7 +59,7 @@ describe('FindAdByUuidUseCase', () => { ); expect(user).toBe(mockAd); }); - it('should throw an error if user does not exist', async () => { + it('should throw an error if ad does not exist', async () => { const findAdByUuidRequest: FindAdByUuidRequest = new FindAdByUuidRequest(); findAdByUuidRequest.uuid = 'bb281075-1b98-4456-89d6-c643d3044a90'; diff --git a/src/modules/ad/tests/unit/messager.spec.ts b/src/modules/ad/tests/unit/messager.spec.ts index 4a3c396..2296553 100644 --- a/src/modules/ad/tests/unit/messager.spec.ts +++ b/src/modules/ad/tests/unit/messager.spec.ts @@ -41,7 +41,7 @@ describe('Messager', () => { it('should publish a message', async () => { jest.spyOn(mockAmqpConnection, 'publish'); - messager.publish('user.create.info', 'my-test'); + messager.publish('ad.create.info', 'my-test'); expect(mockAmqpConnection.publish).toHaveBeenCalledTimes(1); }); });