diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2017-12-04 11:18:54 +0100 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-01-17 09:55:00 +0100 |
commit | ac92d70d9025e1c90bffa99c08bfc4cdb2fc36c9 (patch) | |
tree | 5363b42dbe41a07759558eed33fe0f1193d00b61 /spec | |
parent | 88832ba9392d4521b7de003e6d7ea88c59f2d579 (diff) | |
download | gitlab-ce-ac92d70d9025e1c90bffa99c08bfc4cdb2fc36c9.tar.gz |
extract concern for hook triggers
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/concerns/triggerable_hooks_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/models/concerns/triggerable_hooks_spec.rb b/spec/models/concerns/triggerable_hooks_spec.rb new file mode 100644 index 00000000000..695df5e10aa --- /dev/null +++ b/spec/models/concerns/triggerable_hooks_spec.rb @@ -0,0 +1,17 @@ +require 'rails_helper' + +RSpec.describe TriggerableHooks do + before do + class TestableHook < WebHook + include TriggerableHooks + triggerable_hooks only: [:push_hooks] + end + end + + describe 'scopes' do + it 'defines a scope for each of the requested triggers' do + expect(TestableHook).to respond_to :push_hooks + expect(TestableHook).not_to respond_to :tag_push_hooks + end + end +end |