cleanup lastHeard in node info (instead of position.time)

This commit is contained in:
Kevin Hester 2021-03-27 10:53:39 +08:00
parent 3be55f8c7f
commit 3c457a118d
5 changed files with 13 additions and 21 deletions

View file

@ -17,15 +17,7 @@ class MeshServiceTest {
val newerTime = 20
updateNodeInfoTime(nodeInfo, newerTime)
Assert.assertEquals(newerTime, nodeInfo.position?.time)
}
@Test
fun givenNodeInfo_whenUpdatingWithOldTime_thenPositionTimeIsNotUpdated() {
val olderTime = 5
val timeBeforeTryingToUpdate = nodeInfo.position?.time
updateNodeInfoTime(nodeInfo, olderTime)
Assert.assertEquals(timeBeforeTryingToUpdate, nodeInfo.position?.time)
Assert.assertEquals(newerTime, nodeInfo.lastHeard)
}
}