Author: vparfonov
Date: 2010-07-14 09:08:08 -0400 (Wed, 14 Jul 2010)
New Revision: 2786
Modified:
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPropFind.java
Log:
EXOJCR-857 : ad test for reproduce bug
Modified:
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPropFind.java
===================================================================
---
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPropFind.java 2010-07-14
10:22:15 UTC (rev 2785)
+++
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPropFind.java 2010-07-14
13:08:08 UTC (rev 2786)
@@ -30,6 +30,8 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
import javax.jcr.Node;
import javax.ws.rs.core.HttpHeaders;
@@ -154,6 +156,29 @@
assertTrue(find.contains(authorProp));
assertTrue(find.contains(author));
}
+
+
+
+
+
+ public void _testPropWithPercent() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String file = TestUtils.getFileName();
+ TestUtils.addContent(session, file, new ByteArrayInputStream(content.getBytes()),
nt_webdave_file, "");
+ TestUtils.addNodeProperty(session, file, authorProp, "bla % bla");
+ ContainerResponse responseFind =
+ service(WebDAVMethods.PROPFIND, getPathWS() + file, "", null,
allPropsXML.getBytes());
+ assertEquals(HTTPStatus.MULTISTATUS, responseFind.getStatus());
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ PropFindResponseEntity entity = (PropFindResponseEntity)responseFind.getEntity();
+ entity.write(outputStream);
+ String find = outputStream.toString();
+ assertTrue(find.contains("D:getlastmodified"));
+ assertTrue(find.contains(authorProp));
+ assertTrue(find.contains(author));
+ }
+
@Override
protected String getRepositoryName()
Show replies by date