Skip to content

Commit

Permalink
Update SchemaValidation.test.ts
Browse files Browse the repository at this point in the history
Fix delete
  • Loading branch information
jleiva-gap committed Oct 27, 2023
1 parent b1e8fad commit c09dd79
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Meadowlark-js/tests/e2e/scenarios/SchemaValidation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ describe('When creating a resource', () => {

describe('When performing crud operations with extraneous elements with allow overposting false', () => {
let resourceResponse;
let resourceLocation;
const resource = 'contentClassDescriptors';
const resourceEndpoint = `/v3.3b/ed-fi/${resource}`;
const resourceBody = {
Expand Down Expand Up @@ -346,12 +347,13 @@ describe('When performing crud operations with extraneous elements with allow ov
.send(resourceBodyWithExtraneousElements)
.then((response) => {
resourceResponse = response;
resourceLocation = response.headers.location;
});
});

afterAll(async () => {
await rootURLRequest()
.delete(resourceResponse.headers.location)
.delete(resourceLocation)
.auth(await getAccessToken('host'), { type: 'bearer' });
});

Expand All @@ -360,7 +362,6 @@ describe('When performing crud operations with extraneous elements with allow ov
});
});
describe('when updating a resource', () => {
let resourceLocation;
beforeAll(async () => {
await baseURLRequest()
.post(resourceEndpoint)
Expand Down

0 comments on commit c09dd79

Please sign in to comment.