mirror of
https://github.com/outline/outline.git
synced 2026-11-29 16:40:27 +03:00
add notification test
This commit is contained in:
1 parent
a2cac8df2a
commit
092528f9cd
1 file changed
+31
-1
@@ -49,7 +49,7 @@ describe("Notification", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("should return mention reference", () => {
|
||||
describe.only("should return mention reference", () => {
|
||||
it("mentioned in document", async () => {
|
||||
const document = await buildDocument();
|
||||
const notification = await buildNotification({
|
||||
@@ -81,6 +81,36 @@ describe("Notification", () => {
|
||||
expect(references?.length).toBe(1);
|
||||
expect(references![0]).toBe(expectedReference);
|
||||
});
|
||||
|
||||
it("group mentioned in document", async () => {
|
||||
const document = await buildDocument();
|
||||
const notification = await buildNotification({
|
||||
event: NotificationEventType.GroupMentionedInDocument,
|
||||
documentId: document.id,
|
||||
});
|
||||
|
||||
const references = await Notification.emailReferences(notification);
|
||||
const expectedReference = Notification.emailMessageId(
|
||||
`${document.id}-group-mentions`
|
||||
);
|
||||
expect(references?.length).toBe(1);
|
||||
expect(references![0]).toBe(expectedReference);
|
||||
});
|
||||
|
||||
it("group mentioned in comment", async () => {
|
||||
const document = await buildDocument();
|
||||
const notification = await buildNotification({
|
||||
event: NotificationEventType.GroupMentionedInComment,
|
||||
documentId: document.id,
|
||||
});
|
||||
|
||||
const references = await Notification.emailReferences(notification);
|
||||
const expectedReference = Notification.emailMessageId(
|
||||
`${document.id}-group-mentions`
|
||||
);
|
||||
expect(references?.length).toBe(1);
|
||||
expect(references![0]).toBe(expectedReference);
|
||||
});
|
||||
});
|
||||
|
||||
describe("should return comment reference", () => {
|
||||
|
||||
Reference in new issue
Block a user