0
Fork 0
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:
scottdesilva 2025-01-06 14:33:48 -05:00 committed by GitHub
parent c78e9d6ad5
commit 1f0ffd634a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,6 +90,18 @@ describe(TagService.name, () => {
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', () => {