diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-08-12 11:48:47 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-08-12 11:48:47 +0300 |
commit | 9fdcbcb0de414967618cfd7f26141e85805fcb54 (patch) | |
tree | 42c7ab3867e78ac285fef4fbb95044221554c20a /spec/factories | |
parent | d5264e8804bca70e613c418a9d346f5787c6fc7a (diff) |
Have trait all_events_enabled so that's easier to reuse, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13823349
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/project_hooks.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/project_hooks.rb b/spec/factories/project_hooks.rb index 3195fb3ddcc..c709432c865 100644 --- a/spec/factories/project_hooks.rb +++ b/spec/factories/project_hooks.rb @@ -5,5 +5,17 @@ FactoryGirl.define do trait :token do token { SecureRandom.hex(10) } end + + trait :all_events_enabled do + %w[push_events + merge_requests_events + tag_push_events + issues_events + note_events + build_events + pipeline_events].each do |event| + send(event, true) + end + end end end |