Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: disable folders update handler [WPB-14923] #3161

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading