summaryrefslogtreecommitdiff
path: root/spec/factories/ci/stages.rb
blob: b2ded94573808f43f293af5efd0cbe84d1c8d586 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FactoryGirl.define do
  factory :ci_stage, class: Ci::LegacyStage do
    skip_create

    transient do
      name 'test'
      status nil
      warnings nil
      pipeline factory: :ci_empty_pipeline
    end

    initialize_with do
      Ci::LegacyStage.new(pipeline, name: name,
                                    status: status,
                                    warnings: warnings)
    end
  end

  factory :ci_stage_entity, class: Ci::Stage do
    project factory: :project
    pipeline factory: :ci_empty_pipeline

    name 'test'
    status 'pending'
  end
end