mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
cleanup lastHeard in node info (instead of position.time)
This commit is contained in:
parent
3be55f8c7f
commit
3c457a118d
5 changed files with 13 additions and 21 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue