summaryrefslogtreecommitdiff
path: root/spec/support/stub_gitlab_calls.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/stub_gitlab_calls.rb')
-rw-r--r--spec/support/stub_gitlab_calls.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb
index 93f96cacc00..74aa60c283b 100644
--- a/spec/support/stub_gitlab_calls.rb
+++ b/spec/support/stub_gitlab_calls.rb
@@ -13,6 +13,18 @@ module StubGitlabCalls
allow_any_instance_of(Network).to receive(:projects) { project_hash_array }
end
+ def stub_ci_pipeline_hooks
+ allow(PipelineHooksWorker).to receive(:perform_async).and_return(true)
+ end
+
+ def stub_ci_build_hooks
+ allow(BuildHooksWorker).to receive(:perform_async).and_return(true)
+ end
+
+ def stub_repository_forbidden_access
+ allow(Repository).to receive(:is_access_forbidden?).and_return(false)
+ end
+
def stub_ci_pipeline_to_return_yaml_file
stub_ci_pipeline_yaml_file(gitlab_ci_yaml)
end