discourse/spec/models/invite_redeemer_spec.rb

15 lines
460 B
Ruby
Raw Normal View History

2016-04-01 05:33:25 +08:00
require 'rails_helper'
describe InviteRedeemer do
describe '#create_for_email' do
2014-07-14 23:56:26 +08:00
let(:user) { InviteRedeemer.create_user_from_invite(Fabricate(:invite, email: 'walter.white@email.com'), 'walter', 'Walter White') }
it "should be created correctly" do
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')
end
end
end