Skip to content

Commit

Permalink
Added expressions to enforce non-default ids on resource reference li…
Browse files Browse the repository at this point in the history
…nk hrefs.
  • Loading branch information
gmcelhanon committed Nov 27, 2024
1 parent f8d1dac commit d67acf1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4014,6 +4014,7 @@
"pm.test(\"Link's href should reference the schools resource with a non-default id in route\", () => {",
" const href = item.educationOrganizationReference.link.href;",
" pm.expect(href).to.match(/^\\/ed-fi\\/schools\\/[0-9a-f]{32}$/);",
" pm.expect(href).to.not.match(/^\\/ed-fi\\/schools\\/[0]{32}$/);",
"});",
"",
"pm.test(\"Child collection link's rel should identify reference as a LearningStandard\", () => {",
Expand All @@ -4024,6 +4025,7 @@
"pm.test(\"Child collection link's href should reference the correct resource collection with a non-default id in route\", () => {",
" const href = item.learningStandards[0].learningStandardReference.link.href;",
" pm.expect(href).to.match(/^\\/ed-fi\\/learningStandards\\/[0-9a-f]{32}$/);",
" pm.expect(href).to.not.match(/^\\/ed-fi\\/learningStandards\\/[0]{32}$/);",
"});",
"",
""
Expand Down Expand Up @@ -4083,6 +4085,7 @@
"pm.test(\"Link's href should reference the localEducationAgencies resource with a non-default id in route\", () => {\r",
" const href = item.educationOrganizationReference.link.href;\r",
" pm.expect(href).to.match(/^\\/ed-fi\\/localEducationAgencies\\/[0-9a-f]{32}$/);\r",
" pm.expect(href).to.not.match(/^\\/ed-fi\\/localEducationAgencies\\/[0]{32}$/);\r",
"});\r",
"\r",
"pm.test(\"Child collection link's rel should identify reference as a LearningStandard\", () => {\r",
Expand All @@ -4093,6 +4096,7 @@
"pm.test(\"Child collection link's href should reference the correct resource collection with a non-default id in route\", () => {\r",
" const href = item.learningStandards[0].learningStandardReference.link.href;\r",
" pm.expect(href).to.match(/^\\/ed-fi\\/learningStandards\\/[0-9a-f]{32}$/);\r",
" pm.expect(href).to.not.match(/^\\/ed-fi\\/learningStandards\\/[0]{32}$/);\r",
"});\r",
""
],
Expand Down Expand Up @@ -4144,6 +4148,7 @@
"",
" const href = item.studentReference.link.href;",
" pm.expect(href).to.match(/^\\/ed-fi\\/students\\/[0-9a-f]{32}$/);",
" pm.expect(href).to.not.match(/^\\/ed-fi\\/students\\/[0]{32}$/);",
"});",
""
],
Expand Down

0 comments on commit d67acf1

Please sign in to comment.