Skip to content

Commit

Permalink
End-to-end tests for Container creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinnl committed Aug 18, 2020
1 parent eb000fd commit f81969d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ import {
getPublicDefaultAccess,
getPublicResourceAccess,
getFile,
getSourceUrl,
deleteFile,
createEmptyContainerAt,
createEmptyContainerInContainer,
} from "./index";

describe("End-to-end tests", () => {
Expand Down Expand Up @@ -98,6 +102,25 @@ describe("End-to-end tests", () => {
expect(isRawData(nonRdfResourceInfo)).toBe(true);
});

it("can create and remove empty Containers", async () => {
const newContainer1 = await createEmptyContainerAt(
"https://lit-e2e-test.inrupt.net/public/container-test/some-container/"
);
const newContainer2 = await createEmptyContainerInContainer(
"https://lit-e2e-test.inrupt.net/public/container-test/",
{ slugSuggestion: "some-other-container" }
);

expect(getSourceUrl(newContainer1)).toBe(
"https://lit-e2e-test.inrupt.net/public/container-test/some-container/"
);

await deleteFile(
"https://lit-e2e-test.inrupt.net/public/container-test/some-container/"
);
await deleteFile(getSourceUrl(newContainer2));
});

it("should be able to read and update ACLs", async () => {
const fakeWebId =
"https://example.com/fake-webid#" +
Expand Down

0 comments on commit f81969d

Please sign in to comment.