Skip to content

Commit

Permalink
Merge pull request #7191 from thundernest/inject_ClientIdAppName
Browse files Browse the repository at this point in the history
Fix `ValidateServerSettings` Koin definition (`clientIdAppName`)
  • Loading branch information
wmontwe authored Sep 25, 2023
2 parents 2c8e0b8 + 89530e5 commit 3e86179
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.fsck.k9.mail.store.imap.ImapServerSettingsValidator
import com.fsck.k9.mail.store.pop3.Pop3ServerSettingsValidator
import com.fsck.k9.mail.transport.smtp.SmtpServerSettingsValidator
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.core.qualifier.named
import org.koin.dsl.module

val featureAccountServerValidationModule = module {
Expand All @@ -28,7 +29,7 @@ val featureAccountServerValidationModule = module {
imapValidator = ImapServerSettingsValidator(
trustedSocketFactory = get(),
oAuth2TokenProviderFactory = get(),
clientIdAppName = "null", // TODO get real value
clientIdAppName = get(named("ClientIdAppName")),
),
pop3Validator = Pop3ServerSettingsValidator(
trustedSocketFactory = get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import org.junit.runner.RunWith
import org.koin.android.ext.koin.androidContext
import org.koin.core.annotation.KoinExperimentalAPI
import org.koin.core.module.Module
import org.koin.core.qualifier.named
import org.koin.dsl.koinApplication
import org.koin.dsl.module
import org.koin.test.KoinTest
Expand All @@ -42,6 +43,7 @@ class ServerValidationModuleKtTest : KoinTest {
}
}
single<LocalKeyStore> { Mockito.mock() }
single(named("ClientIdAppName")) { "App Name" }
}

@OptIn(KoinExperimentalAPI::class)
Expand Down

0 comments on commit 3e86179

Please sign in to comment.