discourse/spec/models/invite_redeemer_spec.rb

15 lines
440 B
Ruby
Raw Normal View History

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') }
it "should be created correctly" do
2014-07-14 11:56:26 -04:00
user.username.should == 'walter'
user.name.should == 'Walter White'
user.should be_active
user.email.should == 'walter.white@email.com'
end
end
end