render message deleted tile for beacons (#8905)
This commit is contained in:
@@ -25,11 +25,17 @@ describe('shouldDisplayAsBeaconTile', () => {
|
||||
const liveBeacon = makeBeaconInfoEvent(userId, roomId, { isLive: true });
|
||||
const notLiveBeacon = makeBeaconInfoEvent(userId, roomId, { isLive: false });
|
||||
const memberEvent = new MatrixEvent({ type: EventType.RoomMember });
|
||||
const redactedBeacon = makeBeaconInfoEvent(userId, roomId, { isLive: false });
|
||||
redactedBeacon.makeRedacted(redactedBeacon);
|
||||
|
||||
it('returns true for a beacon with live property set to true', () => {
|
||||
expect(shouldDisplayAsBeaconTile(liveBeacon)).toBe(true);
|
||||
});
|
||||
|
||||
it('returns true for a redacted beacon', () => {
|
||||
expect(shouldDisplayAsBeaconTile(redactedBeacon)).toBe(true);
|
||||
});
|
||||
|
||||
it('returns false for a beacon with live property set to false', () => {
|
||||
expect(shouldDisplayAsBeaconTile(notLiveBeacon)).toBe(false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user