2015-10-11 04:41:23 -05:00
|
|
|
require 'rails_helper'
|
2013-08-28 02:18:31 -05:00
|
|
|
|
|
|
|
describe InviteRedeemer do
|
|
|
|
|
|
|
|
describe '#create_for_email' do
|
2014-07-14 10:56:26 -05:00
|
|
|
let(:user) { InviteRedeemer.create_user_from_invite(Fabricate(:invite, email: 'walter.white@email.com'), 'walter', 'Walter White') }
|
2013-08-28 02:18:31 -05:00
|
|
|
it "should be created correctly" do
|
2014-12-31 08:55:03 -06:00
|
|
|
expect(user.username).to eq('walter')
|
|
|
|
expect(user.name).to eq('Walter White')
|
|
|
|
expect(user).to be_active
|
|
|
|
expect(user.email).to eq('walter.white@email.com')
|
2013-08-28 02:18:31 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|