Policies refactor, guest roles (#6732)
This commit is contained in:
@@ -2564,30 +2564,6 @@ describe("#documents.restore", () => {
|
||||
expect(body.data.archivedAt).toEqual(null);
|
||||
});
|
||||
|
||||
it("should not add restored templates to collection structure", async () => {
|
||||
const user = await buildUser();
|
||||
const collection = await buildCollection({
|
||||
teamId: user.teamId,
|
||||
});
|
||||
const template = await buildDocument({
|
||||
teamId: user.teamId,
|
||||
collectionId: collection.id,
|
||||
template: true,
|
||||
});
|
||||
await template.archive(user.id);
|
||||
const res = await server.post("/api/documents.restore", {
|
||||
body: {
|
||||
token: user.getJwtToken(),
|
||||
id: template.id,
|
||||
},
|
||||
});
|
||||
const body = await res.json();
|
||||
expect(res.status).toEqual(200);
|
||||
expect(body.data.archivedAt).toEqual(null);
|
||||
await collection.reload();
|
||||
expect(collection.documentStructure).toEqual(null);
|
||||
});
|
||||
|
||||
it("should restore archived when previous parent is archived", async () => {
|
||||
const user = await buildUser();
|
||||
const document = await buildDocument({
|
||||
|
||||
Reference in New Issue
Block a user