@@ -385,20 +385,26 @@ public void deletionOfDocumentSharedIntoOtherNotebook() throws Exception {
385
385
assertEquals (1 , sharedNotebook .getEntryCount ());
386
386
docSharings = sharingMgr .getRecordSharingInfo (doc .getId ());
387
387
assertEquals (0 , docSharings .size ());
388
- doc = (StructuredDocument ) recordDao .get (doc .getId ());
388
+
389
+ doc = (StructuredDocument ) recordMgr .get (doc .getId ());
389
390
assertFalse (doc .isDeleted ());
390
391
391
392
// pi shares again
392
393
shareRecordIntoGroupNotebook (doc , sharedNotebook , labGroup , pi );
393
394
394
395
// user open notebook in their home folder, and deletes the entry
395
396
logoutAndLoginAs (user );
397
+
398
+ openTransaction ();
399
+ assertEquals (1 , groupShareDao .getRecordGroupSharingsForRecord (doc .getId ()).size ());
396
400
recordDeletionMgr .deleteEntry (userRootId , sharedNotebook .getId (), doc .getId (), user );
401
+ assertEquals (0 , groupShareDao .getRecordGroupSharingsForRecord (doc .getId ()).size ());
402
+ commitTransaction ();
397
403
398
404
// the entry should be unshared from notebook, but shouldn't be deleted
399
405
sharedNotebook = folderMgr .getNotebook (sharedNotebook .getId ());
400
- assertEquals (1 , sharedNotebook .getEntryCount ());
401
- doc = (StructuredDocument ) recordDao .get (doc .getId ());
406
+ assertEquals (2 , sharedNotebook .getEntryCount ());
407
+ doc = (StructuredDocument ) recordMgr .get (doc .getId ());
402
408
assertFalse (doc .isDeleted ());
403
409
}
404
410
0 commit comments