Skip to content

Commit 729d809

Browse files
authored
feat(api-aco): add path to folder (#4636)
1 parent b36741b commit 729d809

File tree

14 files changed

+443
-17
lines changed

14 files changed

+443
-17
lines changed

packages/api-aco/__tests__/flp.tasks.test.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,24 @@ describe("Folder Level Permissions - CREATE FLP", () => {
8888
it("should throw an error if the parent FLP is not found", async () => {
8989
const context = await handler();
9090

91+
const parentFolder = {
92+
title: "Parent Folder",
93+
type: "type1",
94+
slug: "parent-folder",
95+
parentId: null
96+
};
97+
98+
// Let's create the parent folder first
99+
const parentFolderResponse = await context.aco.folder.create(parentFolder);
100+
101+
// Let's delete the parent folder FLP record, this should not happen in real life.
102+
await context.aco.flp.delete(parentFolderResponse.id);
103+
91104
const folder = {
92-
title: "Folder 1",
105+
title: "Folder",
93106
type: "type1",
94-
slug: "folder1",
95-
parentId: "parentId"
107+
slug: "folder-id",
108+
parentId: parentFolderResponse.id
96109
};
97110

98111
await expect(context.aco.folder.create(folder)).rejects.toThrow(

0 commit comments

Comments
 (0)