/**
- * Sone - NewRemotePostHandlerTest.kt - Copyright © 2019 David ‘Bombe’ Roden
+ * Sone - NewRemotePostHandlerTest.kt - Copyright © 2019–2020 David ‘Bombe’ Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
assertThat(remotePostHandlerTest.notifications, not(hasItem(notification)))
}
+ @Test
+ fun `handler removes post from notification if post is removed`() {
+ notification.add(remotePost)
+ remotePostHandlerTest.sendEvent(PostRemovedEvent(remotePost))
+ assertThat(notification.elements, not(hasItem(remotePost)))
+ }
+
+ @Test
+ fun `handler removes post from notification if post is marked as known`() {
+ notification.add(remotePost)
+ remotePostHandlerTest.sendEvent(MarkPostKnownEvent(remotePost))
+ assertThat(notification.elements, not(hasItem(remotePost)))
+ }
+
}
private val remoteSone: Sone = IdOnlySone("remote-sone")