From d9f8d2e6d4169bf5acb199c9d292c38b71fee99a Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 23 Oct 2021 16:02:25 -0700 Subject: [PATCH] fix: Allow tests to pass when default is collab (#2685) --- server/commands/teamCreator.test.js | 4 ++++ server/test/factories.js | 1 + server/test/support.js | 1 + 3 files changed, 6 insertions(+) diff --git a/server/commands/teamCreator.test.js b/server/commands/teamCreator.test.js index 55d5fda22..62654a8aa 100644 --- a/server/commands/teamCreator.test.js +++ b/server/commands/teamCreator.test.js @@ -35,6 +35,7 @@ describe("teamCreator", () => { }); it("should not allow creating multiple teams in installation", async () => { + delete process.env.DEPLOYMENT; await buildTeam(); let error; @@ -56,6 +57,7 @@ describe("teamCreator", () => { }); it("should return existing team when within allowed domains", async () => { + delete process.env.DEPLOYMENT; const existing = await buildTeam(); const result = await teamCreator({ @@ -81,6 +83,8 @@ describe("teamCreator", () => { }); it("should return exising team", async () => { + delete process.env.DEPLOYMENT; + const authenticationProvider = { name: "google", providerId: "example.com", diff --git a/server/test/factories.js b/server/test/factories.js index b7dd824e1..848d065f0 100644 --- a/server/test/factories.js +++ b/server/test/factories.js @@ -47,6 +47,7 @@ export function buildTeam(overrides: Object = {}) { return Team.create( { name: `Team ${count}`, + collaborativeEditing: false, authenticationProviders: [ { name: "slack", diff --git a/server/test/support.js b/server/test/support.js index b82b4f23c..76c0c20d0 100644 --- a/server/test/support.js +++ b/server/test/support.js @@ -18,6 +18,7 @@ export const seed = async () => { const team = await Team.create( { name: "Team", + collaborativeEditing: false, authenticationProviders: [ { name: "slack",