summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/models/user_account_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/user_account_spec.rb b/spec/models/user_account_spec.rb
index 6ce99e3..6466fe8 100644
--- a/spec/models/user_account_spec.rb
+++ b/spec/models/user_account_spec.rb
@@ -6,4 +6,11 @@ RSpec.describe UserAccount, type: :model do
it { should validate_presence_of(:first_name) }
it { should validate_presence_of(:last_name) }
it { should validate_inclusion_of(:role).in_array(%w[master regular]) }
+
+ describe '#full_name' do
+ it "renders the user's full name" do
+ user = create(:user_account, first_name: 'Mobius', last_name: 'One')
+ expect(user.full_name).to eq('Mobius One')
+ end
+ end
end