Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Apr 16, 2020
1 parent 384391c commit 34740e4
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,18 @@ export default function({ getService }: FtrProviderContext) {

const uri = `${API_BASE_PATH}/${PIPELINE_ONE_ID},${PIPELINE_TWO_ID}`;

const { body } = await supertest
const {
body: { itemsDeleted, errors },
} = await supertest
.delete(uri)
.set('kbn-xsrf', 'xxx')
.expect(200);

expect(body).to.eql({
itemsDeleted: [PIPELINE_ONE_ID, PIPELINE_TWO_ID],
errors: [],
expect(errors).to.eql([]);

// The itemsDeleted array order isn't guaranteed, so we assert against each pipeline name instead
[PIPELINE_ONE_ID, PIPELINE_TWO_ID].forEach(pipelineName => {
expect(itemsDeleted.includes(pipelineName)).to.be(true);
});
});

Expand Down

0 comments on commit 34740e4

Please sign in to comment.