Skip to content

Commit afb454c

Browse files
committed
#1519: added test
1 parent a8b243f commit afb454c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/backend/tests/projects.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,5 +280,14 @@ describe('Projects', () => {
280280
expect(manufacturer.name).toBe(prismaManufacturer1.name);
281281
expect(manufacturer.creatorId).toBe(prismaManufacturer1.creatorId);
282282
});
283+
284+
test('Get all Manufacturer works', async () => {
285+
vi.spyOn(prisma.manufacturer, 'findMany').mockResolvedValue([]);
286+
287+
const res = await ProjectsService.getAllManufacturers();
288+
289+
expect(prisma.manufacturer.findMany).toHaveBeenCalledTimes(1);
290+
expect(res).toStrictEqual([]);
291+
});
283292
});
284293
});

0 commit comments

Comments
 (0)