buildUser -> buildAdmin

This commit is contained in:
Tom Moor
2021-03-22 20:59:11 -07:00
parent 9f6ba798c8
commit 059fca27b3
6 changed files with 29 additions and 32 deletions

View File

@ -4,6 +4,7 @@ import app from "../app";
import { Attachment } from "../models";
import {
buildUser,
buildAdmin,
buildCollection,
buildAttachment,
buildDocument,
@ -62,7 +63,7 @@ describe("#attachments.delete", () => {
});
it("should allow deleting an attachment without a document if admin", async () => {
const user = await buildUser({ isAdmin: true });
const user = await buildAdmin();
const attachment = await buildAttachment({
teamId: user.teamId,
});
@ -79,7 +80,7 @@ describe("#attachments.delete", () => {
});
it("should not allow deleting an attachment in another team", async () => {
const user = await buildUser({ isAdmin: true });
const user = await buildAdmin();
const attachment = await buildAttachment();
attachment.documentId = null;