Skip to content

Commit

Permalink
Fix test by mocking WorkManagerProvider.tag
Browse files Browse the repository at this point in the history
Appeared when upgrading androidx.work:work-runtime-ktx from 2.7.1 to 2.8.0 in #8099
  • Loading branch information
bmarty committed Mar 3, 2023
1 parent 8bb78ce commit ceda85f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal class WorkManagerProvider @Inject constructor(
private val coroutineDispatchers: MatrixCoroutineDispatchers,
private val sessionScope: CoroutineScope
) {
private val tag = MATRIX_SDK_TAG_PREFIX + sessionId
val tag = MATRIX_SDK_TAG_PREFIX + sessionId

val workManager = WorkManager.getInstance(context)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ internal class FakeWorkManagerProvider(

val instance = mockk<WorkManagerProvider>().also {
every { it.workManager } returns fakeWorkManager.instance
every { it.tag } returns "Tag"
}
}

0 comments on commit ceda85f

Please sign in to comment.