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 55d5fda2..62654a8a 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 b7dd824e..848d065f 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 b82b4f23..76c0c20d 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",