diff --git a/AutoCatCoreTests/LocationServiceTests.swift b/AutoCatCoreTests/LocationServiceTests.swift index 7360e4d..ce15b74 100644 --- a/AutoCatCoreTests/LocationServiceTests.swift +++ b/AutoCatCoreTests/LocationServiceTests.swift @@ -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])