You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2007/01/31 01:33:22 UTC

svn commit: r501656 - /incubator/roller/trunk/tests/org/apache/roller/business/WeblogCategoryTest.java

Author: agilliland
Date: Tue Jan 30 16:33:22 2007
New Revision: 501656

URL: http://svn.apache.org/viewvc?view=rev&rev=501656
Log:
a few more tests for category lookups by path.


Modified:
    incubator/roller/trunk/tests/org/apache/roller/business/WeblogCategoryTest.java

Modified: incubator/roller/trunk/tests/org/apache/roller/business/WeblogCategoryTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/WeblogCategoryTest.java?view=diff&rev=501656&r1=501655&r2=501656
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/WeblogCategoryTest.java (original)
+++ incubator/roller/trunk/tests/org/apache/roller/business/WeblogCategoryTest.java Tue Jan 30 16:33:22 2007
@@ -192,6 +192,16 @@
         assertNotNull(cat);
         assertEquals(cat, cat3);
         
+        // test lazy lookup, specifying just a name without slashes
+        cat = mgr.getWeblogCategoryByPath(testWeblog, "catTest-cat1");
+        assertNotNull(cat);
+        assertEquals(cat, cat1);
+        
+        // if no path is specified we should get the root category
+        cat = mgr.getWeblogCategoryByPath(testWeblog, null);
+        assertNotNull(cat);
+        assertEquals(cat.getPath(), "/");
+        
         log.info("END");
     }