Merge pull request #6925 from thundernest/fix_failing_tests
Fix failing tests
This commit is contained in:
commit
b99166bc2d
2 changed files with 4 additions and 2 deletions
|
@ -11,6 +11,7 @@ dependencies {
|
|||
implementation(libs.minidns.hla)
|
||||
compileOnly(libs.xmlpull)
|
||||
|
||||
testImplementation(libs.kotlinx.coroutines.test)
|
||||
testImplementation(libs.kxml2)
|
||||
testImplementation(libs.jsoup)
|
||||
testImplementation(libs.okhttp.mockwebserver)
|
||||
|
|
|
@ -4,6 +4,7 @@ import assertk.assertThat
|
|||
import assertk.assertions.isEqualTo
|
||||
import assertk.assertions.isNull
|
||||
import kotlin.test.assertNotNull
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.mockwebserver.MockResponse
|
||||
|
@ -14,7 +15,7 @@ class AutoconfigFetcherTest {
|
|||
private val fetcher = AutoconfigFetcher(OkHttpClient.Builder().build())
|
||||
|
||||
@Test
|
||||
fun shouldHandleNonexistentUrl() {
|
||||
fun shouldHandleNonexistentUrl() = runTest {
|
||||
val nonExistentUrl =
|
||||
"https://autoconfig.domain.invalid/mail/config-v1.1.xml?emailaddress=test%40domain.example".toHttpUrl()
|
||||
|
||||
|
@ -24,7 +25,7 @@ class AutoconfigFetcherTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
fun shouldHandleEmptyResponse() {
|
||||
fun shouldHandleEmptyResponse() = runTest {
|
||||
val server = MockWebServer().apply {
|
||||
this.enqueue(
|
||||
MockResponse()
|
||||
|
|
Loading…
Reference in a new issue