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

Update Projects::CreateService spec expectation

Dombi Attila5ba00f96254d
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb
index 42eea35d9ea..429183bd679 100644
--- a/spec/services/projects/create_service_spec.rb
+++ b/spec/services/projects/create_service_spec.rb
@@ -166,10 +166,9 @@ RSpec.describe Projects::CreateService, type: :model do
it "does not activate hidden custom fields" do
subject
-
- expect(project.project_custom_field_project_mappings.pluck(:custom_field_id))
- .to contain_exactly(text_custom_field.id, bool_custom_field.id)
- expect(project.custom_value_for(hidden_custom_field)).to be_nil
+ expect(subject).not_to be_success
+ expect(subject.errors[hidden_custom_field.attribute_name])
+ .to include "was attempted to be written but is not writable."
end
end
end