Inject UriComponentsBuilder relative to webapp root
Issue: SPR-16813
This commit is contained in:
@@ -20,6 +20,7 @@ import java.time.ZoneId;
|
||||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@@ -52,7 +53,8 @@ public class ServerWebExchangeArgumentResolverTests {
|
||||
private final ServerWebExchangeArgumentResolver resolver =
|
||||
new ServerWebExchangeArgumentResolver(ReactiveAdapterRegistry.getSharedInstance());
|
||||
|
||||
private final MockServerWebExchange exchange = MockServerWebExchange.from(MockServerHttpRequest.get("/path"));
|
||||
private final MockServerWebExchange exchange = MockServerWebExchange.from(
|
||||
MockServerHttpRequest.get("http://example.org:9999/path?q=foo"));
|
||||
|
||||
private ResolvableMethod testMethod = ResolvableMethod.on(getClass()).named("handle").build();
|
||||
|
||||
@@ -103,7 +105,7 @@ public class ServerWebExchangeArgumentResolverTests {
|
||||
|
||||
assertNotNull(value);
|
||||
assertEquals(UriComponentsBuilder.class, value.getClass());
|
||||
assertEquals("/path/next", ((UriComponentsBuilder) value).path("/next").build().toUriString());
|
||||
assertEquals("http://example.org:9999/next", ((UriComponentsBuilder) value).path("/next").toUriString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user