summaryrefslogtreecommitdiff
path: root/spec/support/helpers/git_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/git_helpers.rb')
-rw-r--r--spec/support/helpers/git_helpers.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/helpers/git_helpers.rb b/spec/support/helpers/git_helpers.rb
new file mode 100644
index 00000000000..fc92bc38561
--- /dev/null
+++ b/spec/support/helpers/git_helpers.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module GitHelpers
+ def project_hook_exists?(project)
+ Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ project_path = project.repository.raw_repository.path
+
+ File.exist?(File.join(project_path, 'hooks', 'post-receive'))
+ end
+ end
+end