KEYCLOAK-17665 Use setQueryString

Co-authored-by: Michal Hajas <mhajas@redhat.com>
This commit is contained in:
David Weber 2021-04-21 13:55:59 +02:00 committed by Pedro Igor
parent 5d3f80ab57
commit 6f86241f60

View file

@ -84,7 +84,7 @@ public class KeycloakAuthenticationEntryPointTest {
@Test @Test
public void testCommenceWithRedirectAndQueryParameters() throws Exception { public void testCommenceWithRedirectAndQueryParameters() throws Exception {
configureBrowserRequest(); configureBrowserRequest();
request.addParameter("prompt", "login"); request.setQueryString("prompt=login");
authenticationEntryPoint.commence(request, response, null); authenticationEntryPoint.commence(request, response, null);
assertEquals(HttpStatus.FOUND.value(), response.getStatus()); assertEquals(HttpStatus.FOUND.value(), response.getStatus());
assertNotEquals(KeycloakAuthenticationEntryPoint.DEFAULT_LOGIN_URI, response.getHeader("Location")); assertNotEquals(KeycloakAuthenticationEntryPoint.DEFAULT_LOGIN_URI, response.getHeader("Location"));