mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05: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
1 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue