You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-28 09:24:05 +03:00
Handle case where one message is pinned, and another unpinned
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
This commit is contained in:
@@ -115,5 +115,15 @@ describe('TextForEvent', () => {
|
||||
expect(plainText).toBe(expectedText);
|
||||
expect(renderComponent(component)).toBe(expectedText);
|
||||
});
|
||||
|
||||
it("shows generic text when one message was pinned, and another unpinned", () => {
|
||||
const event = mockPinnedEvent(['message-2'], ['message-1']);
|
||||
const plainText = textForEvent(event);
|
||||
const component = renderer.create(textForEvent(event, true));
|
||||
|
||||
const expectedText = "@foo:example.com changed the pinned messages for the room.";
|
||||
expect(plainText).toBe(expectedText);
|
||||
expect(renderComponent(component)).toBe(expectedText);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user