refactor: validate enum (#19943)

This commit is contained in:
Jason Rasmussen 2025-07-15 13:14:57 -04:00 committed by GitHub
parent 68f249bc03
commit 351701c4d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 161 additions and 225 deletions

View file

@ -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', () => {