This commit is contained in:
Tom Moor
2018-11-12 14:53:32 -08:00
parent c60bd4260f
commit bad8718a6b
2 changed files with 13 additions and 2 deletions

View File

@@ -12,8 +12,17 @@ it('should set subdomain if available', async () => {
});
it('should set subdomain with append if unavailable', async () => {
const team = await buildTeam({ subdomain: 'myteam' });
await buildTeam({ subdomain: 'myteam' });
const team = await buildTeam();
const subdomain = await team.provisionSubdomain('myteam');
expect(subdomain).toEqual('myteam1');
expect(team.subdomain).toEqual('myteam1');
});
it('should do nothing if subdomain already set', async () => {
const team = await buildTeam({ subdomain: 'example' });
const subdomain = await team.provisionSubdomain('myteam');
expect(subdomain).toEqual('example');
expect(team.subdomain).toEqual('example');
});