2013-08-28 03:18:31 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe InviteRedeemer do
|
|
|
|
|
|
|
|
describe '#create_for_email' do
|
2014-07-14 11:56:26 -04:00
|
|
|
let(:user) { InviteRedeemer.create_user_from_invite(Fabricate(:invite, email: 'walter.white@email.com'), 'walter', 'Walter White') }
|
2013-08-28 03:18:31 -04:00
|
|
|
it "should be created correctly" do
|
2014-07-14 11:56:26 -04:00
|
|
|
user.username.should == 'walter'
|
|
|
|
user.name.should == 'Walter White'
|
2013-08-28 03:18:31 -04:00
|
|
|
user.should be_active
|
|
|
|
user.email.should == 'walter.white@email.com'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|