Skip to content

Commit 475c273

Browse files
committed
[O2B-1508] fixed api test
1 parent c6e6867 commit 475c273

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

test/api/lhcFills.test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,17 +554,19 @@ module.exports = () => {
554554
});
555555
});
556556

557-
it('should return 400 for beam types filter, one wrong', (done) => {
557+
// API accepts filters that do not exist, this is because it does not affect the results
558+
it('should return 200 for beam types filter, one wrong', (done) => {
558559
request(server)
559-
.get('/api/lhcFills?age[offset]=0&page[limit]=15&filter[beamsType]=Pb-Pb,Jasper-Jasper,p-p,p-Pb')
560-
.expect(400)
560+
.get('/api/lhcFills?page[offset]=0&page[limit]=15&filter[beamsType]=Pb-Pb,Jasper-Jasper,p-p,p-Pb')
561+
.expect(200)
561562
.end((err, res) => {
562563
if (err) {
563564
done(err);
564565
return;
565566
}
566567

567-
expect(res.body.errors[0].title).to.equal('Invalid Attribute');
568+
expect(res.body.data).to.have.lengthOf(4);
569+
expect(res.body.data[0].fillNumber).to.equal(4);
568570

569571
done();
570572
});

0 commit comments

Comments
 (0)