mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-28 22:18:46 +03:00
Fix test by mocking WorkManagerProvider.tag
Appeared when upgrading androidx.work:work-runtime-ktx from 2.7.1 to 2.8.0 in #8099
This commit is contained in:
parent
8bb78ce68b
commit
ceda85f624
2 changed files with 2 additions and 1 deletions
|
@ -41,7 +41,7 @@ internal class WorkManagerProvider @Inject constructor(
|
||||||
private val coroutineDispatchers: MatrixCoroutineDispatchers,
|
private val coroutineDispatchers: MatrixCoroutineDispatchers,
|
||||||
private val sessionScope: CoroutineScope
|
private val sessionScope: CoroutineScope
|
||||||
) {
|
) {
|
||||||
private val tag = MATRIX_SDK_TAG_PREFIX + sessionId
|
val tag = MATRIX_SDK_TAG_PREFIX + sessionId
|
||||||
|
|
||||||
val workManager = WorkManager.getInstance(context)
|
val workManager = WorkManager.getInstance(context)
|
||||||
|
|
||||||
|
|
|
@ -26,5 +26,6 @@ internal class FakeWorkManagerProvider(
|
||||||
|
|
||||||
val instance = mockk<WorkManagerProvider>().also {
|
val instance = mockk<WorkManagerProvider>().also {
|
||||||
every { it.workManager } returns fakeWorkManager.instance
|
every { it.workManager } returns fakeWorkManager.instance
|
||||||
|
every { it.tag } returns "Tag"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue