roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r453807 - in /incubator/roller/branches/roller_3.0: tests/org/apache/roller/business/WeblogCategoryTest.java web/WEB-INF/jsps/authoring/WeblogEdit.jsp
Date Fri, 06 Oct 2006 23:20:34 GMT
Author: snoopdave
Date: Fri Oct  6 16:20:34 2006
New Revision: 453807

URL: http://svn.apache.org/viewvc?view=rev&rev=453807
Log:
Fix for WAS 6.1 problem

Modified:
    incubator/roller/branches/roller_3.0/tests/org/apache/roller/business/WeblogCategoryTest.java
    incubator/roller/branches/roller_3.0/web/WEB-INF/jsps/authoring/WeblogEdit.jsp

Modified: incubator/roller/branches/roller_3.0/tests/org/apache/roller/business/WeblogCategoryTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/tests/org/apache/roller/business/WeblogCategoryTest.java?view=diff&rev=453807&r1=453806&r2=453807
==============================================================================
--- incubator/roller/branches/roller_3.0/tests/org/apache/roller/business/WeblogCategoryTest.java
(original)
+++ incubator/roller/branches/roller_3.0/tests/org/apache/roller/business/WeblogCategoryTest.java
Fri Oct  6 16:20:34 2006
@@ -292,5 +292,71 @@
         List entries = c1.retrieveWeblogEntries(true);
         assertEquals(3, entries.size());
     }
+    
+    public void testMoveWeblogCategoryContents() throws Exception {
+        
+        WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
+        
+        // add some categories and entries to test with
+        WeblogCategoryData dest = new WeblogCategoryData();
+        dest.setName("c0");
+        dest.setParent(mgr.getRootWeblogCategory(testWeblog));
+        dest.setWebsite(testWeblog);
+        mgr.saveWeblogCategory(dest);
+        
+        WeblogCategoryData c1 = new WeblogCategoryData();
+        c1.setName("c1");
+        c1.setParent(mgr.getRootWeblogCategory(testWeblog));
+        c1.setWebsite(testWeblog);
+        mgr.saveWeblogCategory(c1);
+        
+        WeblogCategoryData c2 = new WeblogCategoryData();
+        c2.setName("c2");
+        c2.setParent(c1);
+        c2.setWebsite(testWeblog);
+        mgr.saveWeblogCategory(c2);
+        
+        WeblogCategoryData c3 = new WeblogCategoryData();
+        c3.setName("c3");
+        c3.setParent(c2);
+        c3.setWebsite(testWeblog);
+        mgr.saveWeblogCategory(c3);
+        
+        TestUtils.endSession(true);
+        
+        c1 = mgr.getWeblogCategory(c1.getId());
+        c2 = mgr.getWeblogCategory(c2.getId());
+        c3 = mgr.getWeblogCategory(c3.getId());
+        dest = mgr.getWeblogCategory(dest.getId());
+        
+        WeblogEntryData e1 = TestUtils.setupWeblogEntry("e1", c1, testWeblog, testUser);
+        WeblogEntryData e2 = TestUtils.setupWeblogEntry("e2", c2, testWeblog, testUser);
+        WeblogEntryData e3 = TestUtils.setupWeblogEntry("e3", c3, testWeblog, testUser);
+        
+        TestUtils.endSession(true);
+        
+        // verify number of entries in each category
+        assertEquals(0, dest.retrieveWeblogEntries(true).size());
+        assertEquals(0, dest.retrieveWeblogEntries(false).size());
+        assertEquals(1, c1.retrieveWeblogEntries(false).size());
+        assertEquals(3, c1.retrieveWeblogEntries(true).size());
+        
+        // move contents of source category c1 to destination category dest
+        mgr.moveWeblogCategoryContents(c1, dest);
+        mgr.saveWeblogCategory(c1);
+        TestUtils.endSession(true);
+        
+        // after move, verify number of entries in each category
+        dest = mgr.getWeblogCategory(dest.getId());
+        c1 = mgr.getWeblogCategory(c1.getId());
+        
+        // Hierarchy is flattened under dest      
+        assertEquals(3, dest.retrieveWeblogEntries(true).size());
+        assertEquals(3, dest.retrieveWeblogEntries(false).size());
+        
+        // c1 category should be empty now
+        assertEquals(0, c1.retrieveWeblogEntries(false).size());
+               
 
+    }
 }

Modified: incubator/roller/branches/roller_3.0/web/WEB-INF/jsps/authoring/WeblogEdit.jsp
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/web/WEB-INF/jsps/authoring/WeblogEdit.jsp?view=diff&rev=453807&r1=453806&r2=453807
==============================================================================
--- incubator/roller/branches/roller_3.0/web/WEB-INF/jsps/authoring/WeblogEdit.jsp (original)
+++ incubator/roller/branches/roller_3.0/web/WEB-INF/jsps/authoring/WeblogEdit.jsp Fri Oct
 6 16:20:34 2006
@@ -211,7 +211,7 @@
     <div style="width: 100%;"> <%-- need this div to control text-area size in IE
6 --%>
        <%-- include edit page --%>
        <div >
-            <jsp:include page="<%= "/roller-ui/authoring/editors/"+model.getEditorPage()
%>" />
+            <jsp:include page='<%= "/roller-ui/authoring/editors/"+model.getEditorPage()
%>' />
        </div>
      </div>
     </c:if>



Mime
View raw message