Unit tests: adding verification that redaction does not happen when event id is empty
This commit is contained in:
parent
2121ec5739
commit
7961525869
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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) }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user