fixed login() and getContextPath() when working with non-root context

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20576 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
huybrechts committed 2009-08-09 20:05:02 +00:00
1 parent 9d55900f8f
commit da9baa17c3
1 file changed
+3 -3
@@ -157,7 +157,7 @@ public abstract class HudsonTestCase extends TestCase {
protected Server server;
/**
* Where in the {@link Server} is Hudson deploed?
* Where in the {@link Server} is Hudson deployed?
*/
protected String contextPath = "/";
@@ -822,7 +822,7 @@ public abstract class HudsonTestCase extends TestCase {
* Logs in to Hudson.
*/
public WebClient login(String username, String password) throws Exception {
HtmlPage page = goTo("login");
HtmlPage page = goTo("/login");
// page = (HtmlPage) page.getFirstAnchorByText("Login").click();
HtmlForm form = page.getFormByName("login");
@@ -928,7 +928,7 @@ public abstract class HudsonTestCase extends TestCase {
* URL ends with '/'.
*/
public String getContextPath() {
return "http://localhost:"+localPort+contextPath;
return "http://localhost:"+localPort+contextPath+"/";
}
/**