2020-11-12 07:09:39 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :merge_request_cleanup_schedule, class: 'MergeRequest::CleanupSchedule' do
|
|
|
|
merge_request
|
2021-07-14 08:09:23 -04:00
|
|
|
scheduled_at { 1.day.ago }
|
|
|
|
|
|
|
|
trait :running do
|
|
|
|
status { MergeRequest::CleanupSchedule::STATUSES[:running] }
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :completed do
|
|
|
|
status { MergeRequest::CleanupSchedule::STATUSES[:completed] }
|
|
|
|
completed_at { Time.current }
|
|
|
|
end
|
|
|
|
|
|
|
|
trait :failed do
|
|
|
|
status { MergeRequest::CleanupSchedule::STATUSES[:failed] }
|
|
|
|
end
|
2020-11-12 07:09:39 -05:00
|
|
|
end
|
|
|
|
end
|