jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1507061 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
Date Thu, 25 Jul 2013 16:49:10 GMT
Author: angela
Date: Thu Jul 25 16:49:10 2013
New Revision: 1507061

URL: http://svn.apache.org/r1507061
Log:
OAK-226: adding test case

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java?rev=1507061&r1=1507060&r2=1507061&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/ReadPropertyTest.java
Thu Jul 25 16:49:10 2013
@@ -69,12 +69,11 @@ public class ReadPropertyTest extends Ab
             assertTrue(testSession.itemExists(pPath));
             assertTrue(testSession.propertyExists(pPath));
             Property p = testSession.getProperty(pPath);
-            assertEquals(pPath, p.getPath());
         }
     }
 
     @Test
-    public void testReadPropertyParent() throws Exception {
+    public void testGetParent() throws Exception {
         deny(path, privilegesFromName(PrivilegeConstants.REP_READ_NODES));
 
         List<String> propertyPaths = new ArrayList<String>();
@@ -92,4 +91,20 @@ public class ReadPropertyTest extends Ab
             }
         }
     }
+
+    @Test
+    public void testGetPath() throws Exception {
+        deny(path, privilegesFromName(PrivilegeConstants.JCR_READ));
+        allow(path, privilegesFromName(PrivilegeConstants.REP_READ_PROPERTIES));
+
+        List<String> propertyPaths = new ArrayList<String>();
+        propertyPaths.add(childPPath);
+        propertyPaths.add(childchildPPath);
+        propertyPaths.add(path + "/jcr:primaryType");
+
+        for (String pPath : propertyPaths) {
+            Property p = testSession.getProperty(pPath);
+            assertEquals(pPath, p.getPath());
+        }
+    }
 }
\ No newline at end of file



Mime
View raw message