Navigation: fix test and update log.
This commit is contained in:
parent
da21e8ba63
commit
5ec6d7c235
2 changed files with 3 additions and 4 deletions
|
|
@ -167,7 +167,7 @@ class DefaultAppNavigationStateService @Inject constructor(
|
|||
}
|
||||
|
||||
private fun logError(logPrefix: String) {
|
||||
Timber.tag(loggerTag.value).w("$logPrefix must be call first, can't leave.")
|
||||
Timber.tag(loggerTag.value).w("$logPrefix must be call first.")
|
||||
}
|
||||
|
||||
private fun NavigationState.assertOwner(owner: String): Boolean {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import io.element.android.services.appnavstate.test.A_THREAD_OWNER
|
|||
import io.element.android.tests.testutils.runCancellableScopeTest
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.flow.first
|
||||
import org.junit.Assert.assertThrows
|
||||
import org.junit.Test
|
||||
|
||||
class DefaultNavigationStateServiceTest {
|
||||
|
|
@ -63,8 +62,8 @@ class DefaultNavigationStateServiceTest {
|
|||
@Test
|
||||
fun testFailure() = runCancellableScopeTest { scope ->
|
||||
val service = createStateService(scope)
|
||||
|
||||
assertThrows(IllegalStateException::class.java) { service.onNavigateToSpace(A_SPACE_OWNER, A_SPACE_ID) }
|
||||
service.onNavigateToSpace(A_SPACE_OWNER, A_SPACE_ID)
|
||||
assertThat(service.appNavigationState.value.navigationState).isEqualTo(NavigationState.Root)
|
||||
}
|
||||
|
||||
private fun createStateService(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue