fix: Cannot create new team on self-hosted

This commit is contained in:
Tom Moor committed 2022-07-20 21:19:10 +01:00
1 parent 4ee3929e9d
commit e44221ef11
2 files changed
+20 -1

No files matched your search

+17
View File
@@ -73,6 +73,23 @@ describe("teamCreator", () => {
});
describe("self hosted", () => {
it("should allow creating first team", async () => {
env.DEPLOYMENT = undefined;
const { team, isNewTeam } = await teamCreator({
name: "Test team",
subdomain: "example",
avatarUrl: "http://example.com/logo.png",
authenticationProvider: {
name: "google",
providerId: "example.com",
},
ip,
});
expect(isNewTeam).toBeTruthy();
expect(team.name).toEqual("Test team");
});
it("should not allow creating multiple teams in installation", async () => {
env.DEPLOYMENT = undefined;
await buildTeam();
+3 -1
View File
@@ -78,7 +78,9 @@ async function teamCreator({
}
}
throw MaximumTeamsError();
if (team) {
throw MaximumTeamsError();
}
}
// If the service did not provide a logo/avatar then we attempt to generate