Skip to content

Commit

Permalink
fix: remove tests related to unneeded pricing language
Browse files Browse the repository at this point in the history
  • Loading branch information
k80bowman committed Dec 12, 2023
1 parent 8dbb9fe commit c5d174a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 73 deletions.
60 changes: 0 additions & 60 deletions packages/orgs-v5/test/unit/commands/members/add.unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('[email protected]', 'admin')

return cmd.run({args: {email: '[email protected]'}, flags: {role: 'admin', team: 'myteam'}})
.then(() => expect('').to.eq(cli.stdout))
.then(() => expect(`Adding [email protected] 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('[email protected]', 'admin')

return cmd.run({args: {email: '[email protected]'}, flags: {role: 'admin', team: 'myteam'}})
.then(() => expect('').to.eq(cli.stdout))
.then(() => expect(`Adding [email protected] 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('[email protected]', 'admin')

return cmd.run({args: {email: '[email protected]'}, flags: {role: 'admin', team: 'myteam'}})
.then(() => expect('').to.eq(cli.stdout))
.then(() => expect(unwrap(cli.stderr)).to.equal(`Adding [email protected] 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')
Expand All @@ -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('[email protected]', 'admin')

let apiGetOrgMembers = stubGet.variableSizeTeamMembers(1)
let apiGetTeamInvites = stubGet.variableSizeTeamInvites(5)

return cmd.run({args: {email: '[email protected]'}, 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 [email protected] 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('[email protected]', 'admin')

Expand Down
13 changes: 0 additions & 13 deletions packages/orgs-v5/test/unit/commands/members/set.unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('[email protected]', 'admin')

return cmd.run({args: {email: '[email protected]'}, flags: {role: 'admin', team: 'myteam'}})
.then(() => expect('').to.eq(cli.stdout))
.then(() => expect(unwrap(cli.stderr)).to.equal(`Adding [email protected] 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', () => {
Expand Down

0 comments on commit c5d174a

Please sign in to comment.