import static net.pterodactylus.sone.Verifiers.verifyJsonError;
import static net.pterodactylus.sone.Verifiers.verifySuccessfulJsonResponse;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.never;
private final BookmarkAjaxPage bookmarkAjaxPage = new BookmarkAjaxPage(webInterface);
@Test
+ public void bookmarkingDoesNotRequireLogin() {
+ assertThat(bookmarkAjaxPage.requiresLogin(), is(false));
+ }
+
+ @Test
public void testBookmarkingExistingPost() throws URISyntaxException {
JsonReturnObject jsonReturnObject = performRequest("/ajax/bookmark.ajax?post=abc", bookmarkAjaxPage);
verifySuccessfulJsonResponse(jsonReturnObject);