+ @Test
+ fun `request with invalid post id results in post being liked by current sone`() {
+ addRequestParameter("type", "post")
+ addRequestParameter("post", "post-id")
+ assertThat(json.isSuccess, equalTo(false))
+ verify(currentSone, never()).addLikedPostId("post-id")
+ verify(core, never()).touchConfiguration()
+ }
+
+ @Test
+ fun `request with invalid reply id results in reply being liked by current sone`() {
+ addRequestParameter("type", "reply")
+ addRequestParameter("reply", "reply-id")
+ assertThat(json.isSuccess, equalTo(false))
+ verify(currentSone, never()).addLikedReplyId("reply-id")
+ verify(core, never()).touchConfiguration()
+ }
+
+ @Test
+ fun `page can be created by dependency injection`() {
+ assertThat(baseInjector.getInstance<LikeAjaxPage>(), notNullValue())
+ }
+