Skip to content

Commit

Permalink
Postman Test CodeFix
Browse files Browse the repository at this point in the history
  • Loading branch information
semalaiappan committed Feb 15, 2024
1 parent e20ab65 commit 2aa6cbe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5913,7 +5913,14 @@
"pm.test(\"Response is 404 or 409\", () => {",
" pm.expect(pm.response.code).to.be.oneOf([404, 409]) ",
" });",
""
"",
"const problemDetails = pm.response.json();",
"",
"pm.test(\"Should return a problem details result for invalid-reference conflict\", () => {",
" pm.expect(pm.response.code).equal(problemDetails.status);",
" pm.expect(problemDetails.type).to.equal(\"urn:ed-fi:api:conflict:invalid-reference\");",
" pm.expect(problemDetails.detail).to.equal(\"The operation cannot be performed because the resource is a dependency of the 'StudentContactAssociation' resource.\");",
"});"
],
"type": "text/javascript"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5262,7 +5262,13 @@
"pm.test(\"Response is 409\", () => {",
" pm.expect(pm.response.code).to.equal(409) ",
" });",
""
"const problemDetails = pm.response.json();",
"",
"pm.test(\"Should return a problem details result for invalid-reference conflict\", () => {",
" pm.expect(pm.response.code).equal(problemDetails.status);",
" pm.expect(problemDetails.type).to.equal(\"urn:ed-fi:api:conflict:invalid-reference\");",
" pm.expect(problemDetails.detail).to.equal(\"The operation cannot be performed because the resource is a dependency of the 'StudentContactAssociation' resource.\");",
"});"
],
"type": "text/javascript"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5428,7 +5428,7 @@
"\r",
"pm.test(\"Should return a problem details result\", () => {\r",
" pm.expect(pm.response.code).equal(problemDetails.status);\r",
" pm.expect(problemDetails.type).to.equal(\"urn:ed-fi:api:conflict\");\r",
" pm.expect(problemDetails.type).to.equal(\"urn:ed-fi:api:conflict:invalid-reference\");\r",
" pm.expect(problemDetails.detail).to.equal(\"The referenced 'Student' resource does not exist.\");\r",
"});\r",
"\r",
Expand Down Expand Up @@ -7910,7 +7910,13 @@
"pm.test(\"Status code is 409\", () => {",
" pm.expect(pm.response.code).to.equal(409);",
"});",
""
"const problemDetails = pm.response.json();",
"",
"pm.test(\"Should return a problem details result for invalid-reference conflict\", () => {",
" pm.expect(pm.response.code).equal(problemDetails.status);",
" pm.expect(problemDetails.type).to.equal(\"urn:ed-fi:api:conflict:invalid-reference\");",
" pm.expect(problemDetails.detail).to.equal(\"The operation cannot be performed because the resource is a dependency of the 'StudentSchoolAssociation' resource.\");",
"});"
],
"type": "text/javascript"
}
Expand Down

0 comments on commit 2aa6cbe

Please sign in to comment.