diff --git a/vector/src/test/java/im/vector/app/features/home/room/detail/location/RedactLiveLocationShareEventUseCaseTest.kt b/vector/src/test/java/im/vector/app/features/home/room/detail/location/RedactLiveLocationShareEventUseCaseTest.kt index 89b619fe3c..2ca285ef50 100644 --- a/vector/src/test/java/im/vector/app/features/home/room/detail/location/RedactLiveLocationShareEventUseCaseTest.kt +++ b/vector/src/test/java/im/vector/app/features/home/room/detail/location/RedactLiveLocationShareEventUseCaseTest.kt @@ -45,5 +45,7 @@ class RedactLiveLocationShareEventUseCaseTest { val event = Event(eventId = "") redactLiveLocationShareEventUseCase.execute(event = event, room = fakeRoom, reason = A_REASON) + + fakeRoom.locationSharingService().verifyRedactLiveLocationShare(inverse = true, beaconInfoEventId = "", reason = A_REASON) } } diff --git a/vector/src/test/java/im/vector/app/test/fakes/FakeLocationSharingService.kt b/vector/src/test/java/im/vector/app/test/fakes/FakeLocationSharingService.kt index d85403a274..ce498a715a 100644 --- a/vector/src/test/java/im/vector/app/test/fakes/FakeLocationSharingService.kt +++ b/vector/src/test/java/im/vector/app/test/fakes/FakeLocationSharingService.kt @@ -56,7 +56,12 @@ class FakeLocationSharingService : LocationSharingService by mockk() { coEvery { redactLiveLocationShare(beaconInfoEventId, reason) } just runs } - fun verifyRedactLiveLocationShare(beaconInfoEventId: String, reason: String?) { - coVerify { redactLiveLocationShare(beaconInfoEventId, reason) } + /** + * @param inverse when true it will check redaction of the live did not happen + * @param beaconInfoEventId event id of the beacon related to the live + * @param reason reason explaining the redaction + */ + fun verifyRedactLiveLocationShare(inverse: Boolean = false, beaconInfoEventId: String, reason: String?) { + coVerify(inverse = inverse) { redactLiveLocationShare(beaconInfoEventId, reason) } } }