From 3da6de402857590c0205e479005bc626510d05c6 Mon Sep 17 00:00:00 2001 From: LautaroPetaccio Date: Fri, 12 Jul 2024 10:23:04 -0300 Subject: [PATCH] fix: Add isPublished mock --- src/Item/Item.service.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Item/Item.service.spec.ts b/src/Item/Item.service.spec.ts index 1be540a3..8cc2d154 100644 --- a/src/Item/Item.service.spec.ts +++ b/src/Item/Item.service.spec.ts @@ -215,7 +215,7 @@ describe('Item Service', () => { }) }) - describe.only('and the item has less than the maximum amount of tags', () => { + describe('and the item has less than the maximum amount of tags', () => { beforeEach(() => { dbItem = { ...dbItemMock, @@ -236,6 +236,9 @@ describe('Item Service', () => { jest .spyOn(CollectionService.prototype, 'getDBCollection') .mockResolvedValueOnce(dbCollectionMock) + jest + .spyOn(CollectionService.prototype, 'isDCLPublished') + .mockResolvedValueOnce(false) ;(Item.upsert as jest.Mock).mockResolvedValueOnce(dbItem) }) it('should not throw any error and return the inserted item', () => {