mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-10 06:14:10 +01:00
refactoring
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
77a9ae601f
commit
c6fb2ef6e1
@ -54,7 +54,7 @@ class ContactsViewModelTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `fetch contacts with error`() =
|
fun `test error contacts state`() =
|
||||||
runTest {
|
runTest {
|
||||||
viewModel = ContactsViewModel(FakeRepositoryError())
|
viewModel = ContactsViewModel(FakeRepositoryError())
|
||||||
assert(viewModel.contactsViewState.value is ContactsUiState.Error)
|
assert(viewModel.contactsViewState.value is ContactsUiState.Error)
|
||||||
|
@ -17,7 +17,7 @@ import com.nextcloud.talk.models.json.generic.GenericMeta
|
|||||||
import org.mockito.Mockito.mock
|
import org.mockito.Mockito.mock
|
||||||
|
|
||||||
object FakeItem {
|
object FakeItem {
|
||||||
val contacts: List<AutocompleteUser>? =
|
val contacts: List<AutocompleteUser> =
|
||||||
listOf(
|
listOf(
|
||||||
AutocompleteUser(id = "android", label = "Android", source = "users"),
|
AutocompleteUser(id = "android", label = "Android", source = "users"),
|
||||||
AutocompleteUser(id = "android1", label = "Android 1", source = "users"),
|
AutocompleteUser(id = "android1", label = "Android 1", source = "users"),
|
||||||
|
Loading…
Reference in New Issue
Block a user