Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

adapt migration spec to account for renamed column

ulfertsb3efb8e95530
diff --git a/spec/migrations/merge_lifecycle_steps_spec.rb b/spec/migrations/merge_lifecycle_steps_spec.rb
index e3e74144ad3..107385594f6 100644
--- a/spec/migrations/merge_lifecycle_steps_spec.rb
+++ b/spec/migrations/merge_lifecycle_steps_spec.rb
@@ -30,6 +30,7 @@
require "spec_helper"
require Rails.root.join("db/migrate/20250324161229_merge_lifecycle_steps.rb")
+require Rails.root.join("db/migrate/20250403150639_link_wp_to_project_phase_definition.rb")
RSpec.describe MergeLifecycleSteps, type: :model do
shared_let(:colors) { create_list(:color, 3) }
@@ -38,6 +39,10 @@ RSpec.describe MergeLifecycleSteps, type: :model do
before do
ActiveRecord::Migration.suppress_messages do
+ # This tested migration depends on the existence of the
+ # project_phase_id column in the work_packages table.
+ # That is why the migration renaming it needs to be rolled back first.
+ LinkWpToProjectPhaseDefinition.new.migrate(:down)
described_class.new.migrate(:down)
end