fix: null validation (#25891)

This commit is contained in:
Jason Rasmussen
2026-02-04 12:27:52 -05:00
committed by GitHub
parent 440b3b4c6f
commit 9dddccd831
18 changed files with 357 additions and 47 deletions

View File

@@ -54,6 +54,14 @@ describe(UserController.name, () => {
expect(body).toEqual(errorDto.badRequest());
});
}
it('should allow an empty avatarColor', async () => {
await request(ctx.getHttpServer())
.put(`/users/me`)
.set('Authorization', `Bearer token`)
.send({ avatarColor: null });
expect(service.updateMe).toHaveBeenCalledWith(undefined, expect.objectContaining({ avatarColor: null }));
});
});
describe('GET /users/:id', () => {