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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Address CR comments
Dombi Attila379096c153cf
diff --git a/spec/models/project/life_cycle_spec.rb b/spec/models/project/life_cycle_spec.rbindex ce8dd5c41ec..cc52e9cb95c 100644--- a/spec/models/project/life_cycle_spec.rb+++ b/spec/models/project/life_cycle_spec.rb@@ -56,15 +56,13 @@ RSpec.describe Project::LifeCycle dosubject { create :project_gate }it "does not allow updating the life_cycle" do- expect do- subject.life_cycle = build :gate- end.to raise_error ActiveRecord::ReadonlyAttributeError+ expect(subject).to have_readonly_attribute(:life_cycle_id)endendend# For more specs see:# - spec/support/shared/project_life_cycle_helpers.rb- # - spec/models/projects/gate_spec.rb- # - spec/models/projects/stage_spec.rb+ # - spec/models/project/gate_spec.rb+ # - spec/models/project/stage_spec.rbenddiff --git a/spec/seeders/basic_data/life_cycle_seeder_spec.rb b/spec/seeders/basic_data/life_cycle_seeder_spec.rbindex 6481d6a065e..eb7fd0a8546 100644--- a/spec/seeders/basic_data/life_cycle_seeder_spec.rb+++ b/spec/seeders/basic_data/life_cycle_seeder_spec.rb@@ -68,19 +68,19 @@ RSpec.describe BasicData::LifeCycleSeeder doit "creates the corresponding life cycles with the given attributes" doexpect(LifeCycle.count).to eq(5)expect(Stage.find_by(name: "Initiating")).to have_attributes(- color_id: Color.find_by(name: "Orange (dark)").id+ color: have_attributes(name: "Orange (dark)"))expect(Gate.find_by(name: "Ready for Executing")).to have_attributes(- color_id: Color.find_by(name: "Purple").id+ color: have_attributes(name: "Purple"))expect(Stage.find_by(name: "Planning")).to have_attributes(- color_id: Color.find_by(name: "Red (dark)").id+ color: have_attributes(name: "Red (dark)"))expect(Stage.find_by(name: "Executing")).to have_attributes(- color_id: Color.find_by(name: "Magenta (light)").id+ color: have_attributes(name: "Magenta (light)"))expect(Stage.find_by(name: "Closing")).to have_attributes(- color_id: Color.find_by(name: "Green Yellow").id+ color: have_attributes(name: "Green Yellow"))enddiff --git a/spec/support/shared/life_cycle_helpers.rb b/spec/support/shared/life_cycle_helpers.rbindex d0ebdc542b8..ba363537661 100644--- a/spec/support/shared/life_cycle_helpers.rb+++ b/spec/support/shared/life_cycle_helpers.rb@@ -28,13 +28,13 @@RSpec.shared_examples_for "a LifeCycle event" doit "inherits from LifeCycle" do- expect(described_class < LifeCycle).to be true+ expect(described_class).to be < LifeCycleenddescribe "associations" doit { is_expected.to have_many(:project_life_cycles).dependent(:destroy) }it { is_expected.to have_many(:projects).through(:project_life_cycles) }- it { is_expected.to belong_to(:color).required(true) }+ it { is_expected.to belong_to(:color).required }enddescribe "validations" dodiff --git a/spec/support/shared/project_life_cycle_helpers.rb b/spec/support/shared/project_life_cycle_helpers.rbindex 551e6c58a2c..7fd60a45a46 100644--- a/spec/support/shared/project_life_cycle_helpers.rb+++ b/spec/support/shared/project_life_cycle_helpers.rb@@ -28,12 +28,12 @@RSpec.shared_examples_for "a Project::LifeCycle event" doit "inherits from Project::LifeCycle" do- expect(described_class < Project::LifeCycle).to be true+ expect(described_class).to be < Project::LifeCycleenddescribe "associations" do- it { is_expected.to belong_to(:project).required(true) }- it { is_expected.to belong_to(:life_cycle).required(true) }+ it { is_expected.to belong_to(:project).required }+ it { is_expected.to belong_to(:life_cycle).required }it { is_expected.to have_many(:work_packages) }end