Skip to content

Commit

Permalink
ref: document tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MontaGhanmy committed Sep 15, 2023
1 parent 6e68088 commit 9c8a4cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class DriveFileMockClass {
access_info: MockAccessInformation;
creator: string;
is_directory: boolean;
scope: "personal" | "shared";
created_by: Record<string, any>;
shared_by: Record<string, any>;
}
Expand Down
4 changes: 3 additions & 1 deletion tdrive/backend/node/test/e2e/documents/documents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ describe("the Drive feature", () => {

const createItem = async (): Promise<DriveFileMockClass> => {
await TestDbService.getInstance(platform, true);

const scope: "personal" | "shared" = "shared";
const item = {
name: "new test file",
parent_id: "root",
company_id: platform.workspace.company_id,
scope,
};

const version = {};
Expand Down Expand Up @@ -143,6 +144,7 @@ describe("the Drive feature", () => {
);

expect(listTrashResult.item.name).toEqual("Trash");
expect(createItemResult.scope).toEqual("shared");
expect(listTrashResult.children.some(({ id }) => id === createItemResult.id)).toBeTruthy();
});

Expand Down

0 comments on commit 9c8a4cb

Please sign in to comment.