diff --git a/packages/orgs-v5/test/unit/commands/members/add.unit.test.js b/packages/orgs-v5/test/unit/commands/members/add.unit.test.js index 087e51097d..c72944aba4 100644 --- a/packages/orgs-v5/test/unit/commands/members/add.unit.test.js +++ b/packages/orgs-v5/test/unit/commands/members/add.unit.test.js @@ -20,50 +20,6 @@ describe('heroku members:add', () => { beforeEach(() => { stubGet.teamFeatures([]) }) - - context('and group is a team', () => { - beforeEach(() => { - stubGet.teamInfo('team') - }) - - it('does not warn the user when under the free org limit', () => { - stubGet.variableSizeTeamMembers(1) - stubGet.variableSizeTeamInvites(0) - apiUpdateMemberRole = stubPut.updateMemberRole('foo@foo.com', 'admin') - - return cmd.run({args: {email: 'foo@foo.com'}, flags: {role: 'admin', team: 'myteam'}}) - .then(() => expect('').to.eq(cli.stdout)) - .then(() => expect(`Adding foo@foo.com to myteam as admin... done -`).to.eq(cli.stderr)) - .then(() => apiUpdateMemberRole.done()) - }) - - it('does not warn the user when over the free org limit', () => { - stubGet.variableSizeTeamMembers(7) - stubGet.variableSizeTeamInvites(0) - apiUpdateMemberRole = stubPut.updateMemberRole('foo@foo.com', 'admin') - - return cmd.run({args: {email: 'foo@foo.com'}, flags: {role: 'admin', team: 'myteam'}}) - .then(() => expect('').to.eq(cli.stdout)) - .then(() => expect(`Adding foo@foo.com to myteam as admin... done -`).to.eq(cli.stderr)) - .then(() => apiUpdateMemberRole.done()) - }) - - it('does warn the user when at the free org limit', () => { - stubGet.variableSizeTeamMembers(6) - stubGet.variableSizeTeamInvites(0) - apiUpdateMemberRole = stubPut.updateMemberRole('foo@foo.com', 'admin') - - return cmd.run({args: {email: 'foo@foo.com'}, flags: {role: 'admin', team: 'myteam'}}) - .then(() => expect('').to.eq(cli.stdout)) - .then(() => expect(unwrap(cli.stderr)).to.equal(`Adding foo@foo.com to myteam as admin... done \ -You'll be billed monthly for teams over 5 members. -`)) - .then(() => apiUpdateMemberRole.done()) - }) - }) - context('and group is an enterprise org', () => { beforeEach(() => { stubGet.teamInfo('enterprise') @@ -88,22 +44,6 @@ You'll be billed monthly for teams over 5 members. stubGet.teamInfo('team') }) - it('does warn the user when free org limit is caused by invites', () => { - let apiSendInvite = stubPut.sendInvite('foo@foo.com', 'admin') - - let apiGetOrgMembers = stubGet.variableSizeTeamMembers(1) - let apiGetTeamInvites = stubGet.variableSizeTeamInvites(5) - - return cmd.run({args: {email: 'foo@foo.com'}, flags: {role: 'admin', team: 'myteam'}}) - .then(() => apiSendInvite.done()) - .then(() => apiGetOrgMembers.done()) - .then(() => apiGetTeamInvites.done()) - .then(() => expect('').to.eq(cli.stdout)) - .then(() => expect(unwrap(cli.stderr)).to.equal(`Inviting foo@foo.com to myteam as admin... email sent \ -You'll be billed monthly for teams over 5 members. -`)) - }) - it('sends an invite when adding a new user to the team', () => { let apiSendInvite = stubPut.sendInvite('foo@foo.com', 'admin') diff --git a/packages/orgs-v5/test/unit/commands/members/set.unit.test.js b/packages/orgs-v5/test/unit/commands/members/set.unit.test.js index 8790a79986..25630cc025 100644 --- a/packages/orgs-v5/test/unit/commands/members/set.unit.test.js +++ b/packages/orgs-v5/test/unit/commands/members/set.unit.test.js @@ -47,19 +47,6 @@ describe('heroku members:set', () => { `).to.eq(cli.stderr)) .then(() => apiUpdateMemberRole.done()) }) - - it('does warn the user when at the free org limit', () => { - stubGet.variableSizeTeamMembers(6) - stubGet.variableSizeTeamInvites(0) - apiUpdateMemberRole = stubPatch.updateMemberRole('foo@foo.com', 'admin') - - return cmd.run({args: {email: 'foo@foo.com'}, flags: {role: 'admin', team: 'myteam'}}) - .then(() => expect('').to.eq(cli.stdout)) - .then(() => expect(unwrap(cli.stderr)).to.equal(`Adding foo@foo.com to myteam as admin... done \ -You'll be billed monthly for teams over 5 members. -`)) - .then(() => apiUpdateMemberRole.done()) - }) }) context('and group is an enterprise org', () => {