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 () => {
|
it("deletes cloned branch", async () => {
|
||||||
const response = await supertest(app)
|
const clonedBranchId = await createClone();
|
||||||
.post("/etapi/branches")
|
|
||||||
.auth(USER, token, { "type": "basic"})
|
|
||||||
.send({
|
|
||||||
noteId: createdNoteId,
|
|
||||||
parentNoteId: "_hidden"
|
|
||||||
});
|
|
||||||
const clonedBranchId = response.body.branchId;
|
|
||||||
await expectFound("branches", createdBranchId);
|
await expectFound("branches", createdBranchId);
|
||||||
await expectFound("branches", clonedBranchId);
|
await expectFound("branches", clonedBranchId);
|
||||||
|
|
||||||
@ -60,14 +54,7 @@ describe("etapi/delete-entities", () => {
|
|||||||
it("deletes note with all branches", async () => {
|
it("deletes note with all branches", async () => {
|
||||||
const attributeId = await createAttribute();
|
const attributeId = await createAttribute();
|
||||||
|
|
||||||
const response = await supertest(app)
|
const clonedBranchId = await createClone();
|
||||||
.post("/etapi/branches")
|
|
||||||
.auth(USER, token, { "type": "basic"})
|
|
||||||
.send({
|
|
||||||
noteId: createdNoteId,
|
|
||||||
parentNoteId: "_hidden"
|
|
||||||
});
|
|
||||||
const clonedBranchId = response.body.branchId;
|
|
||||||
|
|
||||||
await expectFound("notes", createdNoteId);
|
await expectFound("notes", createdNoteId);
|
||||||
await expectFound("branches", createdBranchId);
|
await expectFound("branches", createdBranchId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user