From 285c5341855f8af6cbea5e964e3104a4698fa450 Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Sat, 7 Mar 2015 11:23:43 -0700 Subject: Allow admins to override restricted visibility Allow admins to use restricted visibility levels when creating or updating projects. --- spec/services/projects/update_service_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/services/projects/update_service_spec.rb') diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index 10dbc548e86..ea5b8813105 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -47,9 +47,9 @@ describe Projects::UpdateService do context 'respect configured visibility restrictions setting' do before(:each) do - @restrictions = double("restrictions") - allow(@restrictions).to receive(:restricted_visibility_levels) { [ "public" ] } - Settings.stub_chain(:gitlab).and_return(@restrictions) + allow_any_instance_of(ApplicationSetting).to( + receive(:restricted_visibility_levels).and_return([20]) + ) end context 'should be private when updated to private' do -- cgit v1.2.3