project_hooks.rb 429 Bytes
Newer Older
1 2 3
FactoryGirl.define do
  factory :project_hook do
    url { FFaker::Internet.uri('http') }
4 5 6 7

    trait :token do
      token { SecureRandom.hex(10) }
    end
8 9 10 11 12 13 14 15 16 17 18 19

    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
20 21
  end
end