mirror of
https://github.com/outline/outline.git
synced 2026-11-21 05:24:03 +03:00
* fix: Cannot unsubscribe from collection subscriptions via email token * tests * Separate redirect for pass through * Delete both subscriptions * Test draft documents
21 lines
656 B
TypeScript
21 lines
656 B
TypeScript
import { v4 as uuidv4 } from "uuid";
|
|
import env from "@server/env";
|
|
import SubscriptionHelper from "./SubscriptionHelper";
|
|
|
|
describe("SubscriptionHelper", () => {
|
|
describe("unsubscribeUrl", () => {
|
|
it("should return a valid unsubscribe URL", () => {
|
|
const userId = uuidv4();
|
|
const documentId = uuidv4();
|
|
|
|
const unsubscribeUrl = SubscriptionHelper.unsubscribeUrl(
|
|
userId,
|
|
documentId
|
|
);
|
|
expect(unsubscribeUrl).toContain(`${env.URL}/api/subscriptions.delete`);
|
|
expect(unsubscribeUrl).toContain(`userId=${userId}`);
|
|
expect(unsubscribeUrl).toContain(`documentId=${documentId}`);
|
|
});
|
|
});
|
|
});
|