Skip to content

Instantly share code, notes, and snippets.

@jameshd
Created April 12, 2018 20:50
Show Gist options
  • Save jameshd/cba22096269d2b719ca73821004b640e to your computer and use it in GitHub Desktop.
Save jameshd/cba22096269d2b719ca73821004b640e to your computer and use it in GitHub Desktop.
const expectedPropNumber = pm.environment.get("__proposal_id");
const expectedDecision = data.decision;
const $ = cheerio.load(pm.response.text());
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
pm.test("it got the right proposal", function () {
const actualPropNumber = $('proposal_number').text();
pm.expect(actualPropNumber).to.equal(expectedPropNumber);
});
pm.test("it got the right decision", function () {
const actualDecision = $('decision_status').text();
pm.expect(actualDecision).to.equal(expectedDecision);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment