Skip to content

Commit f4f4264

Browse files
committed
[O2B-1492] Add test for filtering environments by partial status history
Ensures the environments API supports partial sequence matching with regards to the status history filter.
1 parent 61bd4c8 commit f4f4264

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/api/environments.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,15 @@ module.exports = () => {
171171
expect(withChar[1].id).to.be.equal(withoutChar[1].id);
172172
});
173173

174+
it('should successfully filter environments on status history with a partial sequence', async () => {
175+
const response = await request(server).get('/api/environments?filter[statusHistory]=D-E');
176+
177+
expect(response.status).to.equal(200);
178+
const environments = response.body.data;
179+
expect(environments.length).to.be.equal(1);
180+
expect(environments[0].id).to.be.equal('KGIS12DS');
181+
});
182+
174183
it('should successfully filter environments status history with limit', async () => {
175184
const response = await request(server).get('/api/environments?filter[statusHistory]=SE&page[limit]=1');
176185

0 commit comments

Comments
 (0)