New Rules stay off lists until the person who holds the pen turns on a share link, or the team features one. Uploaded files are readable only by those readers, stripped of location metadata, and deleted with the Rule, draft, or account.
29 lines
860 B
TypeScript
29 lines
860 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
LISTED_PUBLISHED_RULE_WHERE,
|
|
isListedPublishedRule,
|
|
} from "../../lib/publishedRuleAccess";
|
|
import { RULE_VISIBILITY } from "../../lib/ruleVisibility";
|
|
|
|
describe("isListedPublishedRule", () => {
|
|
it("lists public and featured Rules only", () => {
|
|
expect(
|
|
isListedPublishedRule({ visibility: RULE_VISIBILITY.public_and_featured }),
|
|
).toBe(true);
|
|
expect(
|
|
isListedPublishedRule({ visibility: RULE_VISIBILITY.private }),
|
|
).toBe(false);
|
|
expect(
|
|
isListedPublishedRule({ visibility: RULE_VISIBILITY.shared_by_link }),
|
|
).toBe(false);
|
|
});
|
|
});
|
|
|
|
describe("LISTED_PUBLISHED_RULE_WHERE", () => {
|
|
it("matches public and featured rows", () => {
|
|
expect(LISTED_PUBLISHED_RULE_WHERE).toEqual({
|
|
visibility: RULE_VISIBILITY.public_and_featured,
|
|
});
|
|
});
|
|
});
|