* domain policies exposed on team, consistency * fix: Remove usage of isAdmin in frontend * test
22 lines
674 B
JavaScript
22 lines
674 B
JavaScript
// @flow
|
|
import { buildUser, buildTeam } from "../test/factories";
|
|
import { flushdb } from "../test/support";
|
|
import { serialize } from "./index";
|
|
|
|
beforeEach(() => flushdb());
|
|
|
|
it("should serialize policy", async () => {
|
|
const user = await buildUser();
|
|
const response = serialize(user, user);
|
|
expect(response.update).toEqual(true);
|
|
expect(response.delete).toEqual(true);
|
|
});
|
|
|
|
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.createDocument).toEqual(true);
|
|
expect(response.inviteUser).toEqual(false);
|
|
});
|