incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r699405 - /incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostToRootTest.java
Date Fri, 26 Sep 2008 16:48:01 GMT
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



Mime
View raw message