incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r618931 - in /incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest: HttpTestBase.java ujax/PostServletCreateTest.java
Date Wed, 06 Feb 2008 09:17:32 GMT
Author: bdelacretaz
Date: Wed Feb  6 01:17:30 2008
New Revision: 618931

URL: http://svn.apache.org/viewvc?rev=618931&view=rev
Log:
SLING-223 test added

Modified:
    incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/HttpTestBase.java
    incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/ujax/PostServletCreateTest.java

Modified: incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/HttpTestBase.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/HttpTestBase.java?rev=618931&r1=618930&r2=618931&view=diff
==============================================================================
--- incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/HttpTestBase.java
(original)
+++ incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/HttpTestBase.java
Wed Feb  6 01:17:30 2008
@@ -103,6 +103,7 @@
         }
         
         System.err.println("Checking if the required Sling services are started...");
+        System.err.println("(base URLs=" + HTTP_BASE_URL + " and " + WEBDAV_BASE_URL + ")");
         
         // Try creating a node on server, every 500msec, until ok, with timeout
         final List<String> exceptionMessages = new LinkedList<String>();

Modified: incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/ujax/PostServletCreateTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/ujax/PostServletCreateTest.java?rev=618931&r1=618930&r2=618931&view=diff
==============================================================================
--- incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/ujax/PostServletCreateTest.java
(original)
+++ incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/ujax/PostServletCreateTest.java
Wed Feb  6 01:17:30 2008
@@ -82,6 +82,19 @@
         assertJavascript("some words", content, "out.println(data.c)");
     }
     
+    /** Create a node with a propery in a subnode, and check (SLING-223) */
+    public void testCreateSubnodeProperty() throws IOException {
+        final Map <String, String> props = new HashMap <String, String> ();
+        props.put("a","123");
+        props.put("subnode/b","456");
+        props.put("c","some words");
+        final String createdNodeUrl = testClient.createNode(postUrl + UjaxPostServlet.DEFAULT_CREATE_SUFFIX,
props);
+        final String content = getContent(createdNodeUrl + ".2.json", CONTENT_TYPE_JSON);
+        assertJavascript("123", content, "out.println(data.a)");
+        assertJavascript("456", content, "out.println(data.subnode.b)");
+        assertJavascript("some words", content, "out.println(data.c)");
+    }
+    
     /** Use the default "save prefix" on some parameters, and check that only those
      *  who have the prefix are saved.
      */



Mime
View raw message