Skip to content

Commit

Permalink
Add get by IdentificationCode Postman test
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaksn committed Oct 17, 2024
1 parent e8f3a3c commit a47bd55
Showing 1 changed file with 102 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,8 @@
"script": {
"exec": [
"pm.environment.set('supplied:schoolId', 255901001);\r",
"pm.environment.set('supplied:identificationCode', \"255901001\");\r",
"pm.environment.set('supplied:identificationCodeEducationOrganizationIdentificationSystemDescriptor', \"uri://ed-fi.org/EducationOrganizationIdentificationSystemDescriptor#SEA\");\r",
"pm.environment.set('supplied:nameOfInstitution', 'Grand Bend Middle School');\r",
"pm.environment.set('supplied:shortNameOfInstitution', 'GBES');"
],
Expand Down Expand Up @@ -1950,6 +1952,106 @@
"response": []
}
]
},
{
"name": "When filtering by IdentificationCode",
"item": [
{
"name": "When filtering by an existing identificationCode",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", () => {\r",
" pm.expect(pm.response.code).to.equal(200);\r",
"});\r",
"\r",
"const responseItems = pm.response.json();\r",
"\r",
"pm.test(\"Should return one expected resouce\", () => {\r",
" pm.expect(responseItems.count()).to.equal(1);\r",
" pm.expect(responseItems[0].id).to.equals(pm.environment.get('known:lea_id'));\r",
" pm.expect(responseItems[0].webSite).to.equals(pm.environment.get('supplied:webSite'));\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{ApiBaseUrl}}/data/v3/ed-fi/localEducationAgencies?identificaitonCode={{supplied:identificationCode}}",
"host": [
"{{ApiBaseUrl}}"
],
"path": [
"data",
"v3",
"ed-fi",
"localEducationAgencies"
],
"query": [
{
"key": "identificaitonCode",
"value": "{{supplied:identificationCode}}"
}
]
}
},
"response": []
},
{
"name": "When filtering by a non-existent identificationCode",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", () => {\r",
" pm.expect(pm.response.code).to.equal(200);\r",
"});\r",
"\r",
"pm.test(\"Should return an empty response\", () => {\r",
" const responseItems = pm.response.json();\r",
"\r",
" pm.expect(responseItems.count()).to.equal(0);\r",
"});\r",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{ApiBaseUrl}}/data/v3/ed-fi/localEducationAgencies?identificationCode=non-existent",
"host": [
"{{ApiBaseUrl}}"
],
"path": [
"data",
"v3",
"ed-fi",
"localEducationAgencies"
],
"query": [
{
"key": "identificationCode",
"value": "non-existent"
}
]
}
},
"response": []
}
]
}
]
},
Expand Down

0 comments on commit a47bd55

Please sign in to comment.