You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-10 23:22:22 +02:00
fix(server): unit test for creating tag with color (#15120)
* Pass color to tag repo on creation * unit test for creating tag with optional color
This commit is contained in:
@@ -90,6 +90,18 @@ describe(TagService.name, () => {
|
|||||||
value: 'tag-1',
|
value: 'tag-1',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should create a new tag with optional color', async () => {
|
||||||
|
tagMock.create.mockResolvedValue(tagStub.color1);
|
||||||
|
await expect(sut.create(authStub.admin, { name: 'tag-1', color: '#000000' })).resolves.toEqual(
|
||||||
|
tagResponseStub.color1,
|
||||||
|
);
|
||||||
|
expect(tagMock.create).toHaveBeenCalledWith({
|
||||||
|
userId: authStub.admin.user.id,
|
||||||
|
value: 'tag-1',
|
||||||
|
color: '#000000',
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('update', () => {
|
describe('update', () => {
|
||||||
|
Reference in New Issue
Block a user