Skip to content

Commit

Permalink
Fix GetDrawerConfig attribute name
Browse files Browse the repository at this point in the history
  • Loading branch information
wmontwe committed Feb 18, 2025
1 parent bf92f54 commit a7e0616
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ val navigationDrawerModule: Module = module {

single<UseCase.GetDrawerConfig> {
GetDrawerConfig(
configProver = get(),
configLoader = get(),
)
}
single<UseCase.SaveDrawerConfig> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import app.k9mail.feature.navigation.drawer.domain.DomainContract.UseCase
import kotlinx.coroutines.flow.Flow

internal class GetDrawerConfig(
private val configProver: DrawerConfigLoader,
private val configLoader: DrawerConfigLoader,
) : UseCase.GetDrawerConfig {
override operator fun invoke(): Flow<DrawerConfig> {
return configProver.loadDrawerConfigFlow()
return configLoader.loadDrawerConfigFlow()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ internal class GetDrawerConfigTest {

@Test
fun `should get drawer config`() = runTest {
val configProver: DrawerConfigLoader = mock()
val configLoader: DrawerConfigLoader = mock()
val drawerConfig = DrawerConfig(
showUnifiedFolders = true,
showStarredCount = true,
showAccountSelector = true,
)

val testSubject = GetDrawerConfig(configProver = configProver)
whenever(configProver.loadDrawerConfigFlow()).thenReturn(flowOf(drawerConfig))
val testSubject = GetDrawerConfig(configLoader = configLoader)
whenever(configLoader.loadDrawerConfigFlow()).thenReturn(flowOf(drawerConfig))

val result = testSubject().first()

Expand Down

0 comments on commit a7e0616

Please sign in to comment.