mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
test(etapi): deduplicate cloning in delete-entities
This commit is contained in:
parent
cd310119bc
commit
931f9e572a
@ -39,14 +39,8 @@ describe("etapi/delete-entities", () => {
|
||||
});
|
||||
|
||||
it("deletes cloned branch", async () => {
|
||||
const response = await supertest(app)
|
||||
.post("/etapi/branches")
|
||||
.auth(USER, token, { "type": "basic"})
|
||||
.send({
|
||||
noteId: createdNoteId,
|
||||
parentNoteId: "_hidden"
|
||||
});
|
||||
const clonedBranchId = response.body.branchId;
|
||||
const clonedBranchId = await createClone();
|
||||
|
||||
await expectFound("branches", createdBranchId);
|
||||
await expectFound("branches", clonedBranchId);
|
||||
|
||||
@ -60,14 +54,7 @@ describe("etapi/delete-entities", () => {
|
||||
it("deletes note with all branches", async () => {
|
||||
const attributeId = await createAttribute();
|
||||
|
||||
const response = await supertest(app)
|
||||
.post("/etapi/branches")
|
||||
.auth(USER, token, { "type": "basic"})
|
||||
.send({
|
||||
noteId: createdNoteId,
|
||||
parentNoteId: "_hidden"
|
||||
});
|
||||
const clonedBranchId = response.body.branchId;
|
||||
const clonedBranchId = await createClone();
|
||||
|
||||
await expectFound("notes", createdNoteId);
|
||||
await expectFound("branches", createdBranchId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user