Additional check for location service tests
This commit is contained in:
parent
586261fedd
commit
e522832b98
@ -270,7 +270,8 @@ struct LocationServiceTests {
|
||||
.reverseGeocodeLocation(.any)
|
||||
.willReturn(hasAddress ? [placemark] : [])
|
||||
|
||||
locationService.setLastEvent(VehicleEventDto(lat: latitude, lon: longitude, addedBy: nil))
|
||||
let originalEvent = VehicleEventDto(lat: latitude, lon: longitude, addedBy: nil)
|
||||
locationService.setLastEvent(originalEvent)
|
||||
|
||||
let event = try await locationService.getRecentLocation()
|
||||
|
||||
@ -282,6 +283,7 @@ struct LocationServiceTests {
|
||||
#expect(event.longitude == longitude)
|
||||
#expect(locationService.lastEvent != nil)
|
||||
#expect(event.address == (hasAddress ? address : nil))
|
||||
#expect(event.id != originalEvent.id)
|
||||
}
|
||||
|
||||
@Test("Get recent location (update existing)", arguments: [true, false])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user