MNT-13097 content reverted as well to head version if you delete last version of node

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133813 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Martin Muller
2016-12-16 10:49:25 +00:00
parent b264e2c4ec
commit 1292beeb9a
2 changed files with 9 additions and 4 deletions

View File

@@ -1366,7 +1366,12 @@ public class Version2ServiceImpl extends VersionServiceImpl implements VersionSe
try try
{ {
// Create the restored node // Create the restored node
restoredNodeRef = this.nodeService.createNode(parentNodeRef, assocTypeQName, assocQName, type, props).getChildRef(); restoredNodeRef = this.nodeService.createNode(
parentNodeRef,
assocTypeQName,
assocQName,
type,
props).getChildRef();
} }
finally finally
{ {

View File

@@ -1240,10 +1240,10 @@ public class VersionServiceImplTest extends BaseVersionStoreTest
} }
/** /**
* Test test_MNT13097 * Test testDeleteLastVersion
* MNT-13097. Revert content if the last version is chosen. * MNT-13097. Revert content if the last version was chosen.
*/ */
public void test_MNT13097() public void testDeleteLastVersion()
{ {
// Use 1.0, 2.0 etc for the main part // Use 1.0, 2.0 etc for the main part
versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MAJOR); versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MAJOR);