fix(server): handle 5 digit years (#6457)

This commit is contained in:
Jason Rasmussen 2024-01-17 16:08:38 -05:00 committed by GitHub
parent 574aecc1e2
commit 6f291006e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 13 deletions

View file

@ -1073,6 +1073,16 @@ describe(`${AssetController.name} (e2e)`, () => {
expect(body).toEqual(errorStub.unauthorized);
});
it('should handle 5 digit years', async () => {
const { status, body } = await request(server)
.get('/asset/time-bucket')
.query({ size: TimeBucketSize.MONTH, timeBucket: '+012345-01-01T00:00:00.000Z' })
.set('Authorization', `Bearer ${user1.accessToken}`);
expect(status).toBe(200);
expect(body).toEqual([]);
});
// it('should fail if time bucket is invalid', async () => {
// const { status, body } = await request(server)
// .get('/asset/time-bucket')