mirror of
https://github.com/bitwarden/android.git
synced 2026-11-19 17:40:12 -06:00
BIT-145: Add BaseViewModel and update existing ViewModels (#11)
This commit is contained in:
committed by
Álison Fernandes
parent
ee199b9e9f
commit
2ff4912b92
+2
-2
@@ -12,13 +12,13 @@ class RootNavViewModelTests : BaseViewModelTest() {
|
||||
@Test
|
||||
fun `initial state should be splash`() {
|
||||
val viewModel = RootNavViewModel()
|
||||
assert(viewModel.state.value is RootNavState.Splash)
|
||||
assert(viewModel.stateFlow.value is RootNavState.Splash)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `state should move from splash to login`() = runTest {
|
||||
val viewModel = RootNavViewModel()
|
||||
viewModel.state.test {
|
||||
viewModel.stateFlow.test {
|
||||
assert(awaitItem() is RootNavState.Splash)
|
||||
assert(awaitItem() is RootNavState.Login)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user