mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
#name test added
This commit is contained in:
parent
922e94649d
commit
8ae7155218
1 changed files with 7 additions and 0 deletions
|
|
@ -33,6 +33,13 @@ describe User do
|
|||
expect(another_user.roles[1]).to eq(cfp_role)
|
||||
end
|
||||
|
||||
describe '#name' do
|
||||
it 'returns the username as name if there is not name' do
|
||||
user = create(:user, name: nil)
|
||||
expect(user.name).to eq(user.username)
|
||||
end
|
||||
end
|
||||
|
||||
describe '#has_role?' do
|
||||
describe 'when user has a role' do
|
||||
it 'returns true when the user has the role' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue