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

[#66410] fixed unit test expectations

Eric Schuberte59bf40f0b05
diff --git a/spec/lib/open_project/custom_field_format_spec.rb b/spec/lib/open_project/custom_field_format_spec.rb
index 7bc6da0066e..260a68a8528 100644
--- a/spec/lib/open_project/custom_field_format_spec.rb
+++ b/spec/lib/open_project/custom_field_format_spec.rb
@@ -123,10 +123,11 @@ RSpec.describe OpenProject::CustomFieldFormat do
describe ".disabled_formats" do
it "returns disabled formats" do
formats = described_class.disabled_formats
- expect(formats).to match_array(%w[calculated_value])
+ expect(formats).to match_array(%w[calculated_value scored_list])
end
- context "with calculated values feature flag enabled", with_flag: { calculated_value_project_attribute: true } do
+ context "with feature flags enabled",
+ with_flag: { calculated_value_project_attribute: true, scored_list_custom_fields: true } do
it "returns no disabled formats" do
formats = described_class.disabled_formats
expect(formats).to be_empty
diff --git a/spec/services/custom_fields/hierarchy/hierarchical_item_service_spec.rb b/spec/services/custom_fields/hierarchy/hierarchical_item_service_spec.rb
index f096bc43cea..5984ce6d7a6 100644
--- a/spec/services/custom_fields/hierarchy/hierarchical_item_service_spec.rb
+++ b/spec/services/custom_fields/hierarchy/hierarchical_item_service_spec.rb
@@ -50,7 +50,7 @@ RSpec.describe CustomFields::Hierarchy::HierarchicalItemService, with_ee: [:cust
it "requires a custom field of type hierarchy" do
result = service.generate_root(invalid_custom_field).failure
- expect(result.errors[:custom_field]).to eq(["must have field format 'hierarchy'"])
+ expect(result.errors[:custom_field]).to eq(["format is of unsupported type."])
end
context "with persistence of hierarchy root fails" do