mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 09:15:35 +03:00
refactor: validate enum (#19943)
This commit is contained in:
@@ -59,6 +59,13 @@ describe(APIKeyController.name, () => {
|
||||
expect(status).toBe(400);
|
||||
expect(body).toEqual(factory.responses.badRequest(['id must be a UUID']));
|
||||
});
|
||||
|
||||
it('should allow updating just the name', async () => {
|
||||
const { status } = await request(ctx.getHttpServer())
|
||||
.put(`/api-keys/${factory.uuid()}`)
|
||||
.send({ name: 'new name' });
|
||||
expect(status).toBe(200);
|
||||
});
|
||||
});
|
||||
|
||||
describe('DELETE /api-keys/:id', () => {
|
||||
|
||||
Reference in New Issue
Block a user