summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2017-05-03 04:36:13 +0200
committerGabriel Mazetto <brodock@gmail.com>2017-05-12 23:26:48 +0100
commitf661980904f718440cc700b7d1f38ea8bf0e5480 (patch)
tree7933eee3b85e6af5da9db8223b6d870d8395926f /spec/models
parent8b17fb61b61b1f9707428c2333db2de29c4d3bcf (diff)
downloadgitlab-ce-f661980904f718440cc700b7d1f38ea8bf0e5480.tar.gz
Added repository_update hook
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/hooks/system_hook_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/hooks/system_hook_spec.rb b/spec/models/hooks/system_hook_spec.rb
index 8acec805584..a9e3ac3b679 100644
--- a/spec/models/hooks/system_hook_spec.rb
+++ b/spec/models/hooks/system_hook_spec.rb
@@ -105,4 +105,12 @@ describe SystemHook, models: true do
).once
end
end
+
+ describe '.repository_update_hooks' do
+ it 'returns hooks for repository update events only' do
+ hook = create(:system_hook, repository_update_events: true)
+ create(:system_hook, repository_update_events: false)
+ expect(SystemHook.repository_update_hooks).to eq([hook])
+ end
+ end
end