project_hooks.rb 521 Bytes
Newer Older
1
FactoryBot.define do
2
  factory :project_hook do
3
    url { generate(:url) }
4
    enable_ssl_verification false
5
    project
6 7 8 9

    trait :token do
      token { SecureRandom.hex(10) }
    end
10 11

    trait :all_events_enabled do
12 13 14 15
      push_events true
      merge_requests_events true
      tag_push_events true
      issues_events true
16
      confidential_issues_events true
17
      note_events true
18
      confidential_note_events true
19
      job_events true
20
      pipeline_events true
21
      wiki_page_events true
22
    end
23 24
  end
end