diff options
Diffstat (limited to 'spec/factories/ci/pipeline_schedule.rb')
-rw-r--r-- | spec/factories/ci/pipeline_schedule.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/factories/ci/pipeline_schedule.rb b/spec/factories/ci/pipeline_schedule.rb new file mode 100644 index 00000000000..a716da46ac6 --- /dev/null +++ b/spec/factories/ci/pipeline_schedule.rb @@ -0,0 +1,29 @@ +FactoryGirl.define do + factory :ci_pipeline_schedule, class: Ci::PipelineSchedule do + cron '0 1 * * *' + cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE + ref 'master' + active true + description "pipeline schedule" + project factory: :empty_project + + trait :nightly do + cron '0 1 * * *' + cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE + end + + trait :weekly do + cron '0 1 * * 6' + cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE + end + + trait :monthly do + cron '0 1 22 * *' + cron_timezone Gitlab::Ci::CronParser::VALID_SYNTAX_SAMPLE_TIME_ZONE + end + + trait :inactive do + active false + end + end +end |