Skip to content

Commit

Permalink
chore: disable folders update handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Garzas committed Dec 10, 2024
1 parent d8b69f1 commit daf87b3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ internal class UserPropertiesEventReceiverImpl internal constructor(
}

is Event.UserProperty.FoldersUpdate -> {
handleFoldersUpdate(event)
Either.Right(Unit)
// TODO will be handled in 4.11.0
// handleFoldersUpdate(event)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import com.wire.kalium.logic.framework.TestEvent
import com.wire.kalium.logic.functional.Either
import io.mockative.Mock
import io.mockative.any
import io.mockative.coEvery
import io.mockative.coVerify
import io.mockative.every
import io.mockative.mock
import io.mockative.once
Expand All @@ -49,19 +47,19 @@ class UserPropertiesEventReceiverTest {
}.wasInvoked(exactly = once)
}

@Test
fun givenFoldersUpdateEvent_repositoryIsInvoked() = runTest {
val event = TestEvent.foldersUpdate()
val (arrangement, eventReceiver) = Arrangement()
.withUpdateConversationFolders()
.arrange()

eventReceiver.onEvent(event, TestEvent.liveDeliveryInfo)

coVerify {
arrangement.conversationFolderRepository.updateConversationFolders(any())
}.wasInvoked(exactly = once)
}
// @Test
// fun givenFoldersUpdateEvent_repositoryIsInvoked() = runTest {
// val event = TestEvent.foldersUpdate()
// val (arrangement, eventReceiver) = Arrangement()
// .withUpdateConversationFolders()
// .arrange()
//
// eventReceiver.onEvent(event, TestEvent.liveDeliveryInfo)
//
// coVerify {
// arrangement.conversationFolderRepository.updateConversationFolders(any())
// }.wasInvoked(exactly = once)
// }

private class Arrangement {

Expand All @@ -82,11 +80,11 @@ class UserPropertiesEventReceiverTest {
}.returns(Either.Right(Unit))
}

suspend fun withUpdateConversationFolders() = apply {
coEvery {
conversationFolderRepository.updateConversationFolders(any())
}.returns(Either.Right(Unit))
}
// suspend fun withUpdateConversationFolders() = apply {
// coEvery {
// conversationFolderRepository.updateConversationFolders(any())
// }.returns(Either.Right(Unit))
// }

fun arrange() = this to userPropertiesEventReceiver
}
Expand Down

0 comments on commit daf87b3

Please sign in to comment.