mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:16:05 +08:00 
			
		
		
		
	test(etapi): deduplicate cloning in delete-entities
This commit is contained in:
		
							parent
							
								
									cd310119bc
								
							
						
					
					
						commit
						931f9e572a
					
				
					 1 changed files with 3 additions and 16 deletions
				
			
		|  | @ -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…
	
	Add table
		
		Reference in a new issue