mirror of
https://github.com/immich-app/immich.git
synced 2025-06-02 13:14:54 -04: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:
parent
c78e9d6ad5
commit
1f0ffd634a
@ -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', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user