Add Test for Notification routes

Add @JsonSubTypes on Notification
return all creator on request find_follows_article_by_target
Add testNotifications task
This commit is contained in:
2021-04-14 01:41:49 +02:00
parent 50b4cf1816
commit 39c665b7a9
9 changed files with 130 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ internal class NotificationsPushTest {
@BeforeAll
@JvmStatic
fun before() {
val config: Configuration = Configuration("application-test.conf")
val config = Configuration("application-test.conf")
RedisClient.create(config.redis).connect().sync().flushall()
/* Purge rabbit notification queues */
@@ -45,7 +45,7 @@ internal class NotificationsPushTest {
@Test
fun `Notification from redis is well catch and return`() = runBlocking {
val config: Configuration = Configuration("application-test.conf")
val config = Configuration("application-test.conf")
/* Redis client for test */
val redisClientTest = RedisClient.create(config.redis)
@@ -74,7 +74,7 @@ internal class NotificationsPushTest {
}
val notifAfterSubscribe = ArticleUpdateNotification(article)
/* init event for emulate incomint message from websocket */
/* init event for emulate incoming message from websocket */
val event = MutableSharedFlow<Notification>()
val incomingFlow = event.asSharedFlow()