Skip to content

Instantly share code, notes, and snippets.

@dariayermolova
Last active April 16, 2019 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dariayermolova/beae16bdcb4560f8f3c0c32fc7cb9997 to your computer and use it in GitHub Desktop.
Save dariayermolova/beae16bdcb4560f8f3c0c32fc7cb9997 to your computer and use it in GitHub Desktop.
var jsonData = JSON.parse(responseBody);
tests["response contains approved"] = jsonData.data.approved >= 1;
//or
pm.test("response contains approved", function () {
pm.expect(pm.response.text()).to.include("approved");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment