summaryrefslogtreecommitdiff
path: root/spec/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'spec/migrations')
-rw-r--r--spec/migrations/migrate_stages_statuses_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/migrations/migrate_stages_statuses_spec.rb b/spec/migrations/migrate_stages_statuses_spec.rb
index 81bc38fea10..478ddad262a 100644
--- a/spec/migrations/migrate_stages_statuses_spec.rb
+++ b/spec/migrations/migrate_stages_statuses_spec.rb
@@ -9,7 +9,6 @@ describe MigrateStagesStatuses, :migration do
STATUSES = { created: 0, pending: 1, running: 2, success: 3,
failed: 4, canceled: 5, skipped: 6, manual: 7 }
- STAGES = { test: 1, build: 2, deploy: 3}
before do
projects.create!(id: 1, name: 'gitlab1', path: 'gitlab1')
@@ -42,8 +41,10 @@ describe MigrateStagesStatuses, :migration do
end
def create_job(project:, pipeline:, stage:, status:, **opts)
+ stages = { test: 1, build: 2, deploy: 3}
+
jobs.create!(project_id: project, commit_id: pipeline,
- stage_idx: STAGES[stage.to_sym], stage: stage,
+ stage_idx: stages[stage.to_sym], stage: stage,
status: status, **opts)
end
end