discourse/spec/models/invite_redeemer_spec.rb

15 lines
420 B
Ruby

require 'spec_helper'
describe InviteRedeemer do
describe '#create_for_email' do
let(:user) { InviteRedeemer.create_user_from_invite(Fabricate(:invite, email: 'walter.white@email.com')) }
it "should be created correctly" do
user.username.should == 'walter_white'
user.name.should == 'walter_white'
user.should be_active
user.email.should == 'walter.white@email.com'
end
end
end