mirror of
https://github.com/outline/outline.git
synced 2026-12-02 01:34:47 +03:00
* Template management policies * PR feedback * fix: Should not be able to navigate to template edit screen Remove unused action Add 'New document from template' to template menu
21 lines
647 B
TypeScript
21 lines
647 B
TypeScript
import { buildUser, buildTeam } from "@server/test/factories";
|
|
import { serialize } from "./index";
|
|
|
|
it("should serialize policy", async () => {
|
|
const user = await buildUser();
|
|
const response = serialize(user, user);
|
|
expect(response.update).toBeTruthy();
|
|
expect(response.delete).toBeTruthy();
|
|
});
|
|
|
|
it("should serialize domain policies on Team", async () => {
|
|
const team = await buildTeam();
|
|
const user = await buildUser({
|
|
teamId: team.id,
|
|
});
|
|
const response = serialize(user, team);
|
|
expect(response.readTemplate).toBeTruthy();
|
|
expect(response.createTemplate).toEqual(false);
|
|
expect(response.inviteUser).toBeTruthy();
|
|
});
|