debian-mirror-gitlab/spec/factories/project_hooks.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1,012 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
FactoryBot.define do
2016-06-02 11:05:42 +05:30
factory :project_hook do
2017-08-17 22:00:37 +05:30
url { generate(:url) }
2019-12-21 20:55:43 +05:30
enable_ssl_verification { false }
2017-09-10 17:25:29 +05:30
project
2016-06-02 11:05:42 +05:30
2023-01-10 11:22:00 +05:30
trait :url_variables do
2023-05-08 21:46:49 +05:30
url_variables { { 'abc' => 'supers3cret', 'def' => 'foobar' } }
2023-01-10 11:22:00 +05:30
end
2016-06-02 11:05:42 +05:30
trait :token do
2022-08-13 15:12:31 +05:30
token { generate(:token) }
2016-06-02 11:05:42 +05:30
end
2016-09-13 17:45:13 +05:30
trait :all_events_enabled do
2019-12-21 20:55:43 +05:30
push_events { true }
merge_requests_events { true }
tag_push_events { true }
issues_events { true }
confidential_issues_events { true }
note_events { true }
confidential_note_events { true }
job_events { true }
pipeline_events { true }
wiki_page_events { true }
2020-10-24 23:57:45 +05:30
deployment_events { true }
2021-01-29 00:20:46 +05:30
feature_flag_events { true }
releases_events { true }
2016-09-13 17:45:13 +05:30
end
2022-05-07 20:08:51 +05:30
trait :with_push_branch_filter do
push_events_branch_filter { 'my-branch-*' }
end
2022-08-13 15:12:31 +05:30
trait :permanently_disabled do
2023-05-27 22:25:52 +05:30
recent_failures { WebHooks::AutoDisabling::FAILURE_THRESHOLD + 1 }
2022-08-13 15:12:31 +05:30
end
2016-06-02 11:05:42 +05:30
end
end