X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fpages%2FWebPageTest.java;h=9d77df7c7df4708f67dd5adc26a61cec875b804e;hb=b8a263c05601fed21359d502633509f561e8f8e1;hp=f4936b7553bfc5247d2f608c570df8dfec805650;hpb=05fb821e72072bde52f383bdc5a988da67f66d0c;p=Sone.git diff --git a/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java b/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java index f4936b7..9d77df7 100644 --- a/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java +++ b/src/test/java/net/pterodactylus/sone/web/pages/WebPageTest.java @@ -70,6 +70,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.rules.ExpectedException; import org.mockito.ArgumentMatchers; +import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -290,7 +291,7 @@ public abstract class WebPageTest { when(webInterface.getCurrentSoneCreatingSession(toadletContext)).thenReturn(currentSone); when(webInterface.getCurrentSoneWithoutCreatingSession(toadletContext)).thenReturn(currentSone); when(webInterface.getNotification(anyString())).thenReturn(Optional.absent()); - when(webInterface.getNotifications(currentSone)).thenReturn(new ArrayList()); + when(webInterface.getNotifications(Mockito.any())).thenReturn(new ArrayList()); } @Before @@ -316,6 +317,7 @@ public abstract class WebPageTest { throw new RuntimeException(e); } when(freenetRequest.getMethod()).thenReturn(method); + when(httpRequest.getMethod()).thenReturn(method.name()); } protected void addHttpRequestHeader(@Nonnull String name, String value) {