summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-06-19 10:58:10 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-06-19 11:08:11 +0200
commitb143b70d99d68551c2f0b6140997457a86d70f65 (patch)
treead305a0778b8cf828ba16d1733693bf05bfd27ab /android
parentddf9adc1098e16c8a2836ff140d20a1c93ac9d94 (diff)
downloadmullvadvpn-b143b70d99d68551c2f0b6140997457a86d70f65.tar.xz
mullvadvpn-b143b70d99d68551c2f0b6140997457a86d70f65.zip
Replace mocked lists with normal lists with mocked items
Diffstat (limited to 'android')
-rw-r--r--android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepositoryTest.kt6
-rw-r--r--android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListsViewModelTest.kt2
2 files changed, 4 insertions, 4 deletions
diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepositoryTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepositoryTest.kt
index d86c82748d..dc34a19430 100644
--- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepositoryTest.kt
+++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepositoryTest.kt
@@ -51,7 +51,7 @@ class CustomListsRepositoryTest {
CustomList(
id = customListId,
name = mockk(relaxed = true),
- locations = mockk(relaxed = true),
+ locations = listOf(mockk(relaxed = true)),
)
val mockSettings: Settings = mockk()
every { mockSettings.customLists } returns listOf(mockCustomList)
@@ -73,7 +73,7 @@ class CustomListsRepositoryTest {
CustomList(
id = customListId,
name = mockk(relaxed = true),
- locations = mockk(relaxed = true),
+ locations = listOf(mockk(relaxed = true)),
)
val mockSettings: Settings = mockk()
val otherCustomListId = CustomListId("2")
@@ -128,7 +128,7 @@ class CustomListsRepositoryTest {
CustomList(
id = customListId,
name = mockk(relaxed = true),
- locations = mockk(relaxed = true),
+ locations = listOf(mockk(relaxed = true)),
)
every { mockSettings.customLists } returns listOf(mockCustomList)
settingsFlow.value = mockSettings
diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListsViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListsViewModelTest.kt
index 50c52f74cd..fae6546742 100644
--- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListsViewModelTest.kt
+++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListsViewModelTest.kt
@@ -24,7 +24,7 @@ class CustomListsViewModelTest {
@Test
fun `given custom list from relay list use case should be in state`() = runTest {
// Arrange
- val customLists: List<CustomList> = mockk()
+ val customLists: List<CustomList> = listOf(mockk())
val expectedState = CustomListsUiState.Content(customLists)
every { mockCustomListsRepository.customLists } returns MutableStateFlow(customLists)
val viewModel = createViewModel()