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

spec for ProjectPhaseDefinition#to_s

Tobias Dillmannd514d6a586f3
diff --git a/spec/models/project/phase_definition_spec.rb b/spec/models/project/phase_definition_spec.rb
index ff051a69410..b2ce8c8ea21 100644
--- a/spec/models/project/phase_definition_spec.rb
+++ b/spec/models/project/phase_definition_spec.rb
@@ -35,6 +35,10 @@ RSpec.describe Project::PhaseDefinition do
expect { described_class.new }.not_to raise_error
end
+ it "returns its name" do
+ expect(subject.to_s).to eq(subject.name)
+ end
+
describe "validations" do
it { is_expected.to validate_presence_of(:name) }
it { is_expected.to validate_uniqueness_of(:name) }