diff --git a/source/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java b/source/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java index 9ba9c0640d..f74b8bfabe 100644 --- a/source/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java +++ b/source/java/org/alfresco/repo/node/archive/ArchiveAndRestoreTest.java @@ -165,11 +165,11 @@ public class ArchiveAndRestoreTest extends TestCase * Create the following: *
* root - * / | \ - * / | \ - * / | \ - * / | \ - * A <-> B X + * / | + * / | + * / | + * / | + * A <-> B * |\ /| * | \ / | * | \/ | @@ -500,6 +500,17 @@ public class ArchiveAndRestoreTest extends TestCase txn.begin(); } + public void testRestoreToMissingParent() throws Exception + { + nodeService.deleteNode(a); + nodeService.deleteNode(b); + commitAndBeginNewTransaction(); + + // attempt to restore b_ to a + RestoreNodeReport report = nodeArchiveService.restoreArchivedNode(b_, a, null, null); + assertEquals("Incorrect report status", RestoreStatus.FAILURE_INVALID_PARENT, report.getStatus()); + } + public void testMassRestore() throws Exception { nodeService.deleteNode(a);