Skip to content

Commit c8455aa

Browse files
committed
UY-1524 fix tests
1 parent c264f2f commit c8455aa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

vaadin-authentication/src/test/java/io/imunity/vaadin/auth/server/ProxyAuthenticationFilterTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,24 @@ void shouldHandleRequestDispatcherType()
4444
{
4545
when(request.getDispatcherType()).thenReturn(DispatcherType.REQUEST);
4646
when(request.getRequestURI()).thenReturn("/context/test/path");
47-
when(request.getContextPath()).thenReturn("/context");
4847
when(request.getQueryString()).thenReturn("param1=value1");
4948
when(request.getParameterMap()).thenReturn(Map.of("param1", new String[]{"value1"}));
5049

5150
String result = ProxyAuthenticationFilter.getCurrentRelativeURL(request);
5251

53-
assertEquals("/test/path?param1=value1", result);
52+
assertEquals("/context/test/path?param1=value1", result);
5453
}
5554

5655
@Test
5756
void shouldHandleNullQueryString()
5857
{
5958
when(request.getDispatcherType()).thenReturn(DispatcherType.REQUEST);
6059
when(request.getRequestURI()).thenReturn("/context/test/path");
61-
when(request.getContextPath()).thenReturn("/context");
6260
when(request.getQueryString()).thenReturn(null);
6361

6462
String result = ProxyAuthenticationFilter.getCurrentRelativeURL(request);
6563

66-
assertEquals("/test/path", result);
64+
assertEquals("/context/test/path", result);
6765
}
6866

6967
@Test

0 commit comments

Comments
 (0)