Skip to content
Snippets Groups Projects
Unverified Commit 86f03265 authored by Juraj Kusnier's avatar Juraj Kusnier Committed by GitHub
Browse files

Initialize test results with timestamp from LocalData (EXPOSUREAPP-5595) (#2550)

parent 4f7be2c0
Branches master
No related tags found
No related merge requests found
......@@ -37,7 +37,8 @@ class SubmissionRepository @Inject constructor(
private val deadmanNotificationScheduler: DeadmanNotificationScheduler,
private val analyticsKeySubmissionCollector: AnalyticsKeySubmissionCollector
) {
private val testResultReceivedDateFlowInternal = MutableStateFlow(Date())
private val testResultReceivedDateFlowInternal =
MutableStateFlow(Date(LocalData.initialTestResultReceivedTimestamp() ?: System.currentTimeMillis()))
val testResultReceivedDateFlow: Flow<Date> = testResultReceivedDateFlowInternal
private val deviceUIStateFlowInternal =
......
......@@ -133,7 +133,7 @@ class SubmissionRepositoryTest : BaseTest() {
submissionRepository.asyncRegisterDeviceViaGUID(guid)
verify(exactly = 1) {
verify {
LocalData.devicePairingSuccessfulTimestamp(any())
LocalData.registrationToken(registrationToken)
backgroundNoise.scheduleDummyPattern()
......@@ -151,7 +151,7 @@ class SubmissionRepositoryTest : BaseTest() {
submissionRepository.asyncRegisterDeviceViaTAN(tan)
coVerify(exactly = 1) {
coVerify {
LocalData.devicePairingSuccessfulTimestamp(any())
LocalData.registrationToken(registrationToken)
backgroundNoise.scheduleDummyPattern()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment