mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Test for ichain authentication
This commit is contained in:
parent
de92298085
commit
085629958e
2 changed files with 7 additions and 1 deletions
|
|
@ -12,6 +12,12 @@ describe User do
|
|||
let!(:organizer) { create(:user, role_ids: [organizer_role.id]) }
|
||||
let!(:user) { create(:user) }
|
||||
|
||||
it 'User.for_ichain_username raises exception if user is disabled' do
|
||||
user.is_disabled = true
|
||||
user.save
|
||||
expect{User.for_ichain_username(user.username, email: user.email)}.to raise_error(UserDisabled)
|
||||
end
|
||||
|
||||
it 'returns the correct role' do
|
||||
expect(user_admin.is_admin).to eq(true)
|
||||
expect(organizer.roles.first).to eq(organizer_role)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue