raducotescu commented on a change in pull request #4:
URL: 
https://github.com/apache/sling-org-apache-sling-scripting-bundle-tracker-it/pull/4#discussion_r810945847



##########
File path: 
it/src/test/java/org/apache/sling/scripting/bundle/tracker/it/ScriptMatchIT.java
##########
@@ -133,6 +133,23 @@ public void testSelectorMatching() throws Exception {
                 ".scriptmatching/1.0.0/selector-2.html"));
     }
 
+    /*
+     * We need to test that we don't override the default GET servlet for 
resource types without a script
+     * This scenario can happen when we extend a resource type without 
providing a script ourself
+     * in this case, the registration should not override the default servlets 
for the none default extension.
+     * In other words, in this case, only the default extension should be 
handled by the resource super type -
+     * all other extensions should be handled by the default servlet.
+     */
+    @Test
+    public void testDefaultGETServlet() throws Exception {
+        // First test that the default extension is handled by the super type
+        Document document = getDocument(SCRIPT_MATCHING_BASE + 
"-no-version-rtsuper.html");
+        assertTrue(document.html().contains("/libs/rtsuper"));
+        // and now test that the none default json extension is not handled by 
it
+        document = getDocument(SCRIPT_MATCHING_BASE + 
"-no-version-rtsuper.json");
+        assertTrue(!document.html().contains("/libs/rtsuper"));

Review comment:
       Should we add a more specific test here? I'm thinking that we can look 
for some specific output that the Default GET Servlet provides.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to