Make admin flag persist for subsequent calls in spec
This commit is contained in:
parent
346e36e160
commit
25a0723166
@ -4,7 +4,9 @@ RSpec.describe 'Admin dashboard', type: :feature do
|
||||
let(:user) { create :user }
|
||||
|
||||
before do
|
||||
allow(user).to receive(:is_admin?).and_return(true)
|
||||
allow(Devise::LDAP::Adapter).to receive(:get_ldap_param)
|
||||
.with(user.cn, :admin).and_return(["true"])
|
||||
|
||||
login_as user, :scope => :user
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user