Usuń nieaktualny konflikt zakończenia kursu
This commit is contained in:
+30
@@ -50,6 +50,36 @@ class RouteActionServerReconciliationTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun laterConfirmedFinishSupersedesAnOlderConflictingFinish() {
|
||||
assertTrue(
|
||||
routeActionWasSuperseded(
|
||||
action = finish(weight = 11.8, notes = "Starsza uwaga"),
|
||||
hasConfirmedFinishAfter = true,
|
||||
serverRoute = route(
|
||||
status = "ZAKOŃCZONA",
|
||||
weight = null,
|
||||
notes = null,
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun completedServerRouteAloneDoesNotDiscardConflictingLocalData() {
|
||||
assertFalse(
|
||||
routeActionWasSuperseded(
|
||||
action = finish(weight = 11.8, notes = "Nadal ważna uwaga"),
|
||||
hasConfirmedFinishAfter = false,
|
||||
serverRoute = route(
|
||||
status = "ZAKOŃCZONA",
|
||||
weight = null,
|
||||
notes = null,
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
private fun finish(weight: Double?, notes: String?): RouteActionEntity =
|
||||
RouteActionEntity(
|
||||
clientActionId = "finish-1",
|
||||
|
||||
Reference in New Issue
Block a user