You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2008/02/14 14:01:22 UTC

svn commit: r627732 - /incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetWithSuffixTest.java

Author: fmeschbe
Date: Thu Feb 14 05:01:22 2008
New Revision: 627732

URL: http://svn.apache.org/viewvc?rev=627732&view=rev
Log:
SLING-243 add simple test case to ensure GET.* script is called

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

Modified: incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetWithSuffixTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetWithSuffixTest.java?rev=627732&r1=627731&r2=627732&view=diff
==============================================================================
--- incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetWithSuffixTest.java (original)
+++ incubator/sling/trunk/launchpad/launchpad-webapp/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/GetWithSuffixTest.java Thu Feb 14 05:01:22 2008
@@ -56,6 +56,21 @@
             testClient.delete(toDelete);
         }
     }
+    
+    public void testGETScript() throws IOException {
+        final String toDelete = uploadTestScript("rendering-test.esp","GET.esp");
+        try {
+            final String content = getContent(displayUrl + ".html", CONTENT_TYPE_HTML);
+            assertTrue("Content includes ESP marker",content.contains("ESP template"));
+            assertTrue("Content contains formatted test text",content.contains("<p>" + testText + "</p>"));
+
+            final String content2 = getContent(displayUrl + ".txt", CONTENT_TYPE_PLAIN);
+            assertTrue("Content includes ESP marker",content.contains("ESP template"));
+            assertTrue("Content contains formatted test text",content.contains("<p>" + testText + "</p>"));
+        } finally {
+            testClient.delete(toDelete);
+        }
+    }
 
     public void testWithExtraPathA() throws IOException {
         final String toDelete = uploadTestScript("rendering-test.esp","txt.esp");