Send the invitation as a light letter that names the community, the inviter by email, and who can read the Rule.

This commit is contained in:
adilallo committed 2026-11-06 09:00:44 -07:00
1 parent 70ceb73104
commit 727a92a9ac
14 files changed
+534 -26

No files matched your search

+8 -3
View File
@@ -148,9 +148,14 @@ describe("POST /api/rules", () => {
expect(res.status).toBe(200);
expect(transactionMock).toHaveBeenCalledTimes(1);
expect(sendInviteMock).toHaveBeenCalledTimes(1);
expect(sendInviteMock.mock.calls[0][0]).toBe("stakeholder@example.com");
expect(String(sendInviteMock.mock.calls[0][1])).toContain(
"/api/invites/rule-stakeholder/verify?token=",
expect(sendInviteMock).toHaveBeenCalledWith(
expect.objectContaining({
to: "stakeholder@example.com",
communityName: "Published title",
verifyUrl: expect.stringContaining(
"/api/invites/rule-stakeholder/verify?token=",
),
}),
);
expect(publishedRuleCreateMock).not.toHaveBeenCalled();
});