Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Dec 26, 2024
1 parent a220f59 commit 07ee0d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class FilterScreenTest {
RelayFilterUiState(
providerToOwnerships = DUMMY_RELAY_ALL_PROVIDERS,
selectedOwnership = Constraint.Any,
selectedProviders = Constraint.Only(listOf(ProviderId("31173"))),
selectedProviders = Constraint.Only(setOf(ProviderId("31173"))),
),
onApplyClick = mockClickListener,
)
Expand All @@ -146,8 +146,8 @@ class FilterScreenTest {
state =
RelayFilterUiState(
providerToOwnerships = DUMMY_RELAY_ALL_PROVIDERS,
selectedOwnership = null,
selectedProviders = listOf(ProviderId("1RemovedProvider")),
selectedOwnership = Constraint.Any,
selectedProviders = Constraint.Only(setOf(ProviderId("1RemovedProvider"))),
)
)

Expand Down Expand Up @@ -179,6 +179,6 @@ class FilterScreenTest {
ProviderId("xtom") to setOf(Ownership.Rented),
)

private val DUMMY_SELECTED_PROVIDERS = DUMMY_RELAY_ALL_PROVIDERS.keys.toList().dropLast(3)
private val DUMMY_SELECTED_PROVIDERS = DUMMY_RELAY_ALL_PROVIDERS.keys.drop(3).toSet()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class FilterChipUseCaseTest {
fun `ensure that a selected provider that is not in the provider list is still counted`() =
runTest {
// Arrange
val expectedProviders = Providers(providers = setOf(ProviderId("1")))
val expectedProviders = setOf(ProviderId("1"))
val expectedOwnership = Ownership.MullvadOwned
selectedProviders.value = Constraint.Only(expectedProviders)
selectedOwnership.value = Constraint.Only(expectedOwnership)
Expand Down

0 comments on commit 07ee0d1

Please sign in to comment.