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 2008/09/26 18:48:01 UTC

svn commit: r699405 - /incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java

Author: bdelacretaz
Date: Fri Sep 26 09:48:00 2008
New Revision: 699405

URL: http://svn.apache.org/viewvc?rev=699405&view=rev
Log:
SLING-668 - test failed when sling webapp not mounted on /

Modified:
    incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java

Modified: incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java?rev=699405&r1=699404&r2=699405&view=diff
==============================================================================
--- incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java (original)
+++ incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java Fri Sep 26 09:48:00 2008
@@ -23,7 +23,10 @@
 public class PostToRootTest extends HttpTestBase {
 	
 	public void testSetRootProperty() throws Exception {
-		final String url = HTTP_BASE_URL;
+		String url = HTTP_BASE_URL;
+		if(!url.endsWith("/")) {
+			url += "/";
+		}
         final PostMethod post = new PostMethod(url);
 		final String name = getClass().getSimpleName();
 		final String value = getClass().getSimpleName() + System.currentTimeMillis();
@@ -32,7 +35,7 @@
 		final int status = httpClient.executeMethod(post);
 		assertEquals(200, status);
 		
-		final String json = getContent(url + "/.json", CONTENT_TYPE_JSON);
+		final String json = getContent(url + ".json", CONTENT_TYPE_JSON);
 		assertJavascript(value, json, "out.print(data." + name + ")");
 	}
 }
\ No newline at end of file