diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-07-02 00:21:51 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-07-07 05:39:56 +0300 |
commit | cf7c57aaf53036483da35868da84596dcdae2aaf (patch) | |
tree | d978fa5013631d5cec87e8ed0858b94d8e36a570 /spec/services/projects | |
parent | 4b4351a18c5cc31cc1365b24b8c00360730cd100 (diff) |
Use stub_application_setting in a few more specs
These specs also failed when run by themselves before this change, so
we've likely got some kind of cross-test contamination going on.
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/create_service_spec.rb | 4 | ||||
-rw-r--r-- | spec/services/projects/update_service_spec.rb | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb index 337dae592dd..97b206c9854 100644 --- a/spec/services/projects/create_service_spec.rb +++ b/spec/services/projects/create_service_spec.rb @@ -58,9 +58,7 @@ describe Projects::CreateService do context 'restricted visibility level' do before do - allow_any_instance_of(ApplicationSetting).to( - receive(:restricted_visibility_levels).and_return([20]) - ) + stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC]) @opts.merge!( visibility_level: Gitlab::VisibilityLevel.options['Public'] diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index 0dd6980a44f..b347fa15f87 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -47,9 +47,7 @@ describe Projects::UpdateService do context 'respect configured visibility restrictions setting' do before(:each) do - allow_any_instance_of(ApplicationSetting).to( - receive(:restricted_visibility_levels).and_return([20]) - ) + stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC]) end context 'should be private when updated to private' do |