Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var jsonData = pm.response.json();
- var resultCount = jsonData.length;
- for (i=0;i<resultCount;i++){
- var modelString = jsonData[i].name;
- if(modelString.indexOf("Pregnancy") > 0)
- {
- tests["Each organisation name field " +i+ " contains "Pregnancy""] = modelString.has("Pregnancy");
- }
- else
- {
- pm.expect.fail("failed");
- }
- }
- console.log("")
- [
- {
- "id": "1-116992830",
- "name": "British Pregnancy Advisory Service (BPAS)",
- "numberOfLocations": 78
- },
- {
- "id": "1-1560082724",
- "name": "PAMS Pregnancy Ultrasound Centre (PAMS 3D & 4D Baby Imaging)",
- "numberOfLocations": 1
- },
- {
- "id": "1-2458518720",
- "name": "Pregnancy Ultrasound Ltd (Babyface4d)",
- "numberOfLocations": 1
- },
- {
- "id": "1-101728376",
- "name": "National Unplanned Pregnancy Advisory Service Limited",
- "numberOfLocations": 23
- },
- {
- "id": "1-3578030817",
- "name": "Private Pregnancy Ultrasound Services Ltd trading as Expectancy Scanning Studios Ltd (Expectancy Scanning Studios Ltd)",
- "numberOfLocations": 2
- },
- {
- "id": "1-1412821832",
- "name": "Foundation For Life (Salisbury) (Pregnancy Advice Salisbury)",
- "numberOfLocations": 1
- },
- {
- "id": "1-2028907839",
- "name": "Miscarriage Clinic Limited (Centre for Reproductive Immunolgy and Pregnancy)",
- "numberOfLocations": 1
- },
- {
- "id": "1-744810951",
- "name": "Foundation For Life (Tyneside Pregnancy Advice Centre)",
- "numberOfLocations": 1
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement