Fixing tests after merge
This commit is contained in:
@@ -350,7 +350,7 @@ public abstract class BeforeFilterFunctions {
|
||||
queryParams.add(name, replacement);
|
||||
}
|
||||
|
||||
MultiValueMap<String, String> encodedQueryParams = UriUtils.encodeQueryParams(queryParams);
|
||||
MultiValueMap<String, String> encodedQueryParams = MvcUtils.encodeQueryParams(queryParams);
|
||||
URI rewrittenUri = UriComponentsBuilder.fromUri(request.uri())
|
||||
.replaceQueryParams(unmodifiableMultiValueMap(encodedQueryParams))
|
||||
.build(true)
|
||||
|
||||
@@ -117,9 +117,9 @@ class BeforeFilterFunctionsTests {
|
||||
@Test
|
||||
void rewriteEncodedRequestParameter() {
|
||||
MockHttpServletRequest servletRequest = MockMvcRequestBuilders.get("http://localhost/path")
|
||||
.param("foo", "bar")
|
||||
.param("baz[]", "qux[]")
|
||||
.param("quux", "corge+")
|
||||
.param("foo[]", "bar")
|
||||
.param("baz", "qux")
|
||||
.param("quux", "corge+")
|
||||
.buildRequest(null);
|
||||
|
||||
ServerRequest request = ServerRequest.create(servletRequest, Collections.emptyList());
|
||||
@@ -128,7 +128,8 @@ class BeforeFilterFunctionsTests {
|
||||
|
||||
assertThat(result.param("foo[]")).isPresent().hasValue("replacement[]");
|
||||
assertThat(result.param("quux")).isPresent().hasValue("corge+");
|
||||
assertThat(result.uri().toString()).hasToString("http://localhost/path?baz=qux&foo%5B%5D=replacement%5B%5D&quux=corge%2B");
|
||||
assertThat(result.uri().toString())
|
||||
.hasToString("http://localhost/path?quux=corge%2B&baz=qux&foo%5B%5D=replacement%5B%5D");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user