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/requests | |
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/requests')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index e9ff832603f..4178bb2e836 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -220,9 +220,7 @@ describe API::API, api: true do context 'when a visibility level is restricted' do before do @project = attributes_for(:project, { public: true }) - allow_any_instance_of(ApplicationSetting).to( - receive(:restricted_visibility_levels).and_return([20]) - ) + stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC]) end it 'should not allow a non-admin to use a restricted visibility level' do |