FEATURE: Allow sending invites to staged users

This commit is contained in:
Gerhard Schlager
2018-01-19 15:29:15 +01:00
parent f74ac826c5
commit dde0fcc658
7 changed files with 79 additions and 20 deletions

View File

@ -178,6 +178,16 @@ describe Invite do
end
context 'a staged user' do
it 'creates an invite for a staged user' do
Fabricate(:staged, email: 'staged@account.com')
invite = Invite.invite_by_email('staged@account.com', Fabricate(:coding_horror))
expect(invite).to be_valid
expect(invite.email).to eq('staged@account.com')
end
end
context '.redeem' do
let(:invite) { Fabricate(:invite) }