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/create_snippet_service_spec.rb | |
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/create_snippet_service_spec.rb')
-rw-r--r-- | spec/services/create_snippet_service_spec.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/spec/services/create_snippet_service_spec.rb b/spec/services/create_snippet_service_spec.rb index 08689c15ca8..8edabe9450b 100644 --- a/spec/services/create_snippet_service_spec.rb +++ b/spec/services/create_snippet_service_spec.rb @@ -14,11 +14,7 @@ describe CreateSnippetService do context 'When public visibility is restricted' do before do - allow_any_instance_of(ApplicationSetting).to( - receive(:restricted_visibility_levels).and_return( - [Gitlab::VisibilityLevel::PUBLIC] - ) - ) + stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC]) @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC) end |