Simplify verifying that no redirect is called
[Sone.git] / src / test / java / net / pterodactylus / sone / web / pages / WebPageTest.java
index bd21b19..c785e36 100644 (file)
@@ -407,6 +407,11 @@ public abstract class WebPageTest {
                }
        }
 
+       protected void verifyNoRedirect(Runnable verification) throws RedirectException {
+               getPage().handleRequest(freenetRequest, templateContext);
+               verification.run();
+       }
+
        protected void addTranslation(@Nonnull String key, @Nonnull String value) {
                when(l10n.getString(key)).thenReturn(value);
        }