Skip to content

Commit 491b81c

Browse files
committed
RSDEV-446: moving failing junit tests to IT tests (part 1)
1 parent 5ecd36f commit 491b81c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/test/java/com/researchspace/service/RecordSharingIT.java

+9-3
Original file line numberDiff line numberDiff line change
@@ -385,20 +385,26 @@ public void deletionOfDocumentSharedIntoOtherNotebook() throws Exception {
385385
assertEquals(1, sharedNotebook.getEntryCount());
386386
docSharings = sharingMgr.getRecordSharingInfo(doc.getId());
387387
assertEquals(0, docSharings.size());
388-
doc = (StructuredDocument) recordDao.get(doc.getId());
388+
389+
doc = (StructuredDocument) recordMgr.get(doc.getId());
389390
assertFalse(doc.isDeleted());
390391

391392
// pi shares again
392393
shareRecordIntoGroupNotebook(doc, sharedNotebook, labGroup, pi);
393394

394395
// user open notebook in their home folder, and deletes the entry
395396
logoutAndLoginAs(user);
397+
398+
openTransaction();
399+
assertEquals(1, groupShareDao.getRecordGroupSharingsForRecord(doc.getId()).size());
396400
recordDeletionMgr.deleteEntry(userRootId, sharedNotebook.getId(), doc.getId(), user);
401+
assertEquals(0, groupShareDao.getRecordGroupSharingsForRecord(doc.getId()).size());
402+
commitTransaction();
397403

398404
// the entry should be unshared from notebook, but shouldn't be deleted
399405
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());
402408
assertFalse(doc.isDeleted());
403409
}
404410

0 commit comments

Comments
 (0)