File tree Expand file tree Collapse file tree
dspace-server-webapp/src/test/java/org/dspace/app/rest/converter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,7 +89,18 @@ public void testCorrectInternalUrlSetFromConfigurationService() throws Exception
8989
9090 @ Test
9191 public void testConfigurableVersionPrefix () throws Exception {
92- when (configurationService .getProperty ("dspace.version.prefix" , "DSpace" )).thenReturn ("CLARIN-DSpace" );
92+ when (configurationService .getProperty ("dspace.version.prefix" , "CLARIN-DSpace" )).thenReturn ("CustomPrefix" );
93+ request .setScheme ("https" );
94+ request .setServerName ("dspace-rest" );
95+ request .setServerPort (443 );
96+ request .setRequestURI ("/server/api" );
97+ RootRest rootRest = rootConverter .convert (request );
98+ assertEquals ("CustomPrefix " + Util .getSourceVersion (), rootRest .getDspaceVersion ());
99+ }
100+
101+ @ Test
102+ public void testBlankVersionPrefixFallsBackToDefault () throws Exception {
103+ when (configurationService .getProperty ("dspace.version.prefix" , "CLARIN-DSpace" )).thenReturn ("" );
93104 request .setScheme ("https" );
94105 request .setServerName ("dspace-rest" );
95106 request .setServerPort (443 );
You can’t perform that action at this time.
0 commit comments