Skip to content

Commit 47b2198

Browse files
author
GuustMetz
committed
restore lost tests
1 parent f1f91e5 commit 47b2198

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

test/api/lhcFills.test.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,57 @@ module.exports = () => {
471471
});
472472

473473
it('should return 200 and an LHCFill array for runs duration filter, > 00:00:00', (done) => {
474+
request(server)
475+
.get('/api/lhcFills?page[offset]=0&page[limit]=15&filter[runDuration][operator]=>&filter[runDuration][limit]=00:00:00')
476+
.expect(200)
477+
.end((err, res) => {
478+
if (err) {
479+
done(err);
480+
return;
481+
}
482+
483+
expect(res.body.data).to.have.lengthOf(1);
484+
expect(res.body.data[0].fillNumber).to.equal(6);
485+
486+
done();
487+
});
488+
});
489+
490+
it('should return 200 and an LHCFill array for runs duration filter, < 00:00:00', (done) => {
491+
request(server)
492+
.get('/api/lhcFills?page[offset]=0&page[limit]=15&filter[runDuration][operator]=<&filter[runDuration][limit]=00:00:00')
493+
.expect(200)
494+
.end((err, res) => {
495+
if (err) {
496+
done(err);
497+
return;
498+
}
499+
500+
expect(res.body.data).to.have.lengthOf(0);
501+
502+
done();
503+
});
504+
});
505+
506+
507+
it('should return 200 and an LHCFill array for runs duration filter, > 03:00:00', (done) => {
508+
request(server)
509+
.get('/api/lhcFills?page[offset]=0&page[limit]=15&filter[runDuration][operator]=>&filter[runDuration][limit]=03:00:00')
510+
.expect(200)
511+
.end((err, res) => {
512+
if (err) {
513+
done(err);
514+
return;
515+
}
516+
517+
expect(res.body.data).to.have.lengthOf(1);
518+
expect(res.body.data[0].fillNumber).to.equal(6);
519+
520+
done();
521+
});
522+
});
523+
524+
it('should return 400 when stableBeamEnd filter "from" is greater than the current time', (done) => {
474525
request(server)
475526
.get('/api/lhcFills?page[offset]=0&page[limit]=15&filter[stableBeamsEnd][from]=2647867600000')
476527
.expect(400)

0 commit comments

Comments
 (0)