File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
opengrok-web/src/test/java/org/opengrok/web Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -738,7 +738,6 @@ public String getPathInfo() {
738738 assertEquals ("path <foo> - OpenGrok cross reference for /path <foo>" , cfg .getPathTitle ());
739739 }
740740
741-
742741 @ Test
743742 void testGetPathTitleRevision () {
744743 HttpServletRequest req = new DummyHttpServletRequest () {
@@ -760,6 +759,19 @@ public String getParameter(String name) {
760759 assertEquals ("bar (revision 42) - OpenGrok cross reference for /bar" , cfg .getPathTitle ());
761760 }
762761
762+ @ Test
763+ void testGetPathTitleEmptyPath () {
764+ HttpServletRequest req = new DummyHttpServletRequest () {
765+ @ Override
766+ public String getPathInfo () {
767+ return "" ;
768+ }
769+ };
770+
771+ PageConfig cfg = PageConfig .get (req );
772+ assertEquals ("/ - OpenGrok cross reference for /" , cfg .getPathTitle ());
773+ }
774+
763775 @ Test
764776 void testGetHistoryTitle () {
765777 HttpServletRequest req = new DummyHttpServletRequest () {
You can’t perform that action at this time.
0 commit comments