-
Notifications
You must be signed in to change notification settings - Fork 472
Closed
Description
Since 0.22.0.RELEASE, links are built relative to the request context. The following test case in ControllerLinkBuildUnitTest
runs with success against the previous release, but fails with the current.
@Test
public void createsLinkRelativeToContextRoot() {
request.setContextPath("/ctx");
request.setServletPath("/foo");
request.setRequestURI("/ctx/foo");
assertThat(linkTo(PersonControllerImpl.class).withSelfRel().getHref(), endsWith("/ctx/people"));
}
java.lang.AssertionError:
Expected: a string ending with "/ctx/people"
but: was "http://localhost/ctx/foo/people"
Expected :a string ending with "/ctx/people"
This would be a regression to our application due to the invalid links.
sbley