File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
services/web/server/tests/unit/with_dbs/03/trash Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,7 @@ async def test_trash_folder_with_content(
338338 resp = await client .post ("/v0/folders" , json = {"name" : "My first folder" })
339339 data , _ = await assert_status (resp , status .HTTP_201_CREATED )
340340 folder = FolderGet .model_validate (data )
341+ assert folder .trashed_at is None
341342
342343 # CREATE a SUB-folder
343344 resp = await client .post (
@@ -381,12 +382,13 @@ async def test_trash_folder_with_content(
381382 resp = await client .post (f"/v0/folders/{ folder .folder_id } :trash" )
382383 await assert_status (resp , status .HTTP_204_NO_CONTENT )
383384
384- # ONLY folder listed in trash. The rest is not listed anymore!
385+ # ONLY folder listed in trash. The rest is not listed anymore since they are implicitly trashed !
385386 resp = await client .get ("/v0/folders" , params = {"filters" : '{"trashed": true}' })
386387 await assert_status (resp , status .HTTP_200_OK )
387388 page = Page [FolderGet ].model_validate (await resp .json ())
388389 assert page .meta .total == 1
389- assert page .data [0 ] == folder
390+ assert page .data [0 ].trashed_at is not None
391+ assert page .data [0 ].folder_id == folder .folder_id
390392
391393 resp = await client .get (
392394 "/v0/folders" ,
You can’t perform that action at this time.
0 commit comments