summaryrefslogtreecommitdiff
path: root/spec/support/shared_contexts/lib/api/helpers/packages/dependency_proxy_helpers_shared_context.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/support/shared_contexts/lib/api/helpers/packages/dependency_proxy_helpers_shared_context.rb
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
downloadgitlab-ce-14.2.0-rc42.tar.gz
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/support/shared_contexts/lib/api/helpers/packages/dependency_proxy_helpers_shared_context.rb')
-rw-r--r--spec/support/shared_contexts/lib/api/helpers/packages/dependency_proxy_helpers_shared_context.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/support/shared_contexts/lib/api/helpers/packages/dependency_proxy_helpers_shared_context.rb b/spec/support/shared_contexts/lib/api/helpers/packages/dependency_proxy_helpers_shared_context.rb
new file mode 100644
index 00000000000..7c8b6250d24
--- /dev/null
+++ b/spec/support/shared_contexts/lib/api/helpers/packages/dependency_proxy_helpers_shared_context.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+RSpec.shared_context 'dependency proxy helpers context' do
+ def allow_fetch_application_setting(attribute:, return_value:)
+ attributes = double
+ allow(::Gitlab::CurrentSettings.current_application_settings).to receive(:attributes).and_return(attributes)
+ allow(attributes).to receive(:fetch).with(attribute, false).and_return(return_value)
+ end
+end