You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2021/06/08 14:29:50 UTC
[sling-org-apache-sling-jcr-repoinit] 01/02: SLING-10463 -
demonstrate current behavior
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch SLING-10463
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-repoinit.git
commit 42e86e433d3102c2d4b09a8af60f3837189b6da7
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Jun 8 16:21:03 2021 +0200
SLING-10463 - demonstrate current behavior
---
.../java/org/apache/sling/jcr/repoinit/CreatePathsTest.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/test/java/org/apache/sling/jcr/repoinit/CreatePathsTest.java b/src/test/java/org/apache/sling/jcr/repoinit/CreatePathsTest.java
index cb356d9..edcc692 100644
--- a/src/test/java/org/apache/sling/jcr/repoinit/CreatePathsTest.java
+++ b/src/test/java/org/apache/sling/jcr/repoinit/CreatePathsTest.java
@@ -32,6 +32,7 @@ import org.junit.Rule;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/** Test the creation of paths with specific node types */
public class CreatePathsTest {
@@ -139,4 +140,14 @@ public class CreatePathsTest {
Node subFolder2 = subFolder.getNode("subfolder2");
assertEquals("sling:Folder", subFolder2.getPrimaryNodeType().getName());
}
+
+ @Test
+ public void createPathWherePropertyExists() throws Exception {
+ final Node folder = U.adminSession.getRootNode().addNode("cpwpe", "nt:unstructured");
+ folder.setProperty("nodeOrProperty", "someValue");
+ folder.getSession().save();
+ final String fullPath = "/cpwpe/nodeOrProperty";
+ U.parseAndExecute("create path " + fullPath);
+ assertTrue(U.adminSession.propertyExists(fullPath));
+ }
}