diff --git a/test/src/test/java/jenkins/console/ConsoleUrlProviderTest.java b/test/src/test/java/jenkins/console/ConsoleUrlProviderTest.java index b9881fbeddac..9a97ff0748df 100644 --- a/test/src/test/java/jenkins/console/ConsoleUrlProviderTest.java +++ b/test/src/test/java/jenkins/console/ConsoleUrlProviderTest.java @@ -58,9 +58,9 @@ public void getRedirectUrl() throws Exception { // Custom URL without leading slash b.setDescription("custom my/build/console"); assertCustomConsoleUrl(r.contextPath + "/my/build/console", b); - // Custom URL with leading slash + // Custom URL with leading slash -> not supported, falls back to default b.setDescription("custom /my/build/console"); - assertCustomConsoleUrl(r.contextPath + "/my/build/console", b); + assertCustomConsoleUrl(r.contextPath + '/' + b.getUrl() + "console", b); // Default URL is used when extensions throw exceptions. b.setDescription("NullPointerException"); assertCustomConsoleUrl(r.contextPath + '/' + b.getUrl() + "console", b);