🔥 Remove setKnown() method from replies
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / core / UpdatedSoneProcessorTest.kt
index e7afc74..356ea9c 100644 (file)
@@ -123,14 +123,14 @@ class UpdatedSoneProcessorTest {
        @Test
        fun `updated Sone processor does not mark new reply as known if sone was not followed after reply`() {
                updatedSoneProcessor.updateSone(newSone)
-               verify(postReplies[2], never()).isKnown = true
+               verify(database, never()).setPostReplyKnown(postReplies[2])
        }
 
        @Test
        fun `updated Sone processor marks new reply as known if sone was followed after reply`() {
                whenever(database.getFollowingTime("sone")).thenReturn(3500L)
                updatedSoneProcessor.updateSone(newSone)
-               verify(postReplies[2]).isKnown = true
+               verify(database).setPostReplyKnown(postReplies[2])
        }
 
        @Test
@@ -142,6 +142,12 @@ class UpdatedSoneProcessorTest {
        }
 
        @Test
+       fun `updated sone processor stores sone in database`() {
+               updatedSoneProcessor.updateSone(newSone)
+               verify(database).storeSone(newSone)
+       }
+
+       @Test
        fun `default updated Sone processor can be created by dependency injection`() {
                assertThat(baseInjector.createChildInjector(
                                Database::class.isProvidedByMock()