diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-03 21:33:16 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-03 21:33:16 -0600 |
commit | 09a00d91fae22de6d455eb96b59927dfda320dda (patch) | |
tree | eeaf1b55b36ec3cccfdcaf41be7686138d4583fa /spec | |
parent | 3bb0a3c60ae89156f8d0011862b72faf2584dea7 (diff) |
Añade spec del método full_name de usuario
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/user_account_spec.rb | 7 |
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 |