Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m-zagorski committed Dec 18, 2024
1 parent a5fc2dd commit df6a47b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import com.wire.kalium.logic.feature.call.usecase.ObserveEstablishedCallsUseCase
import com.wire.kalium.logic.feature.legalhold.LegalHoldStateForSelfUser
import com.wire.kalium.logic.feature.legalhold.ObserveLegalHoldStateForSelfUserUseCase
import com.wire.kalium.logic.feature.personaltoteamaccount.CanMigrateFromPersonalToTeamUseCase
import com.wire.kalium.logic.feature.server.GetTeamUrlUseCase
import com.wire.kalium.logic.feature.team.GetUpdatedSelfTeamUseCase
import com.wire.kalium.logic.feature.user.GetSelfUserUseCase
import com.wire.kalium.logic.feature.user.IsReadOnlyAccountUseCase
Expand Down Expand Up @@ -101,6 +102,9 @@ class SelfUserProfileViewModelArrangement {
@MockK
lateinit var canMigrateFromPersonalToTeam: CanMigrateFromPersonalToTeamUseCase

@MockK
lateinit var getTeamUrl: GetTeamUrlUseCase

private val viewModel by lazy {
SelfUserProfileViewModel(
selfUserId = TestUser.SELF_USER.id,
Expand All @@ -121,7 +125,8 @@ class SelfUserProfileViewModelArrangement {
globalDataStore = globalDataStore,
qualifiedIdMapper = qualifiedIdMapper,
anonymousAnalyticsManager = anonymousAnalyticsManager,
canMigrateFromPersonalToTeam = canMigrateFromPersonalToTeam
canMigrateFromPersonalToTeam = canMigrateFromPersonalToTeam,
getTeamUrl = getTeamUrl
)
}

Expand All @@ -136,6 +141,7 @@ class SelfUserProfileViewModelArrangement {
coEvery { observeEstablishedCalls.invoke() } returns flowOf(emptyList())
coEvery { observeEstablishedCalls.invoke() } returns flowOf(emptyList())
coEvery { canMigrateFromPersonalToTeam.invoke() } returns true
coEvery { getTeamUrl.invoke() } returns ""
}

fun withLegalHoldStatus(result: LegalHoldStateForSelfUser) = apply {
Expand Down

0 comments on commit df6a47b

Please sign in to comment.