employs mocking of Setting

pull/2155/head
Jens Ulferts 10 years ago
parent 6c8acbe5a5
commit 8bd9f7a889
  1. 3
      spec/requests/api/v3/support/authorization.rb

@ -48,10 +48,9 @@ shared_examples_for 'handling anonymous user' do |type, path|
context 'when access for anonymous user is not allowed' do
before do
Setting.login_required = 1
allow(Setting).to receive(:login_required?).and_return(true)
get get_path
end
after { Setting.login_required = 0 }
it_behaves_like 'unauthenticated access'
end

Loading…
Cancel
Save