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

fix how available custom fields are stubbed in a spec

Ivan Kuchin0932d25f539c
diff --git a/spec/services/queries/projects/project_queries/set_attributes_service_spec.rb b/spec/services/queries/projects/project_queries/set_attributes_service_spec.rb
index 5a6fa1101e6..b40ba1b10bd 100644
--- a/spec/services/queries/projects/project_queries/set_attributes_service_spec.rb
+++ b/spec/services/queries/projects/project_queries/set_attributes_service_spec.rb
@@ -66,11 +66,15 @@ RSpec.describe Queries::Projects::ProjectQueries::SetAttributesService, type: :m
.to receive(:find_by)
.with(id: cf.id.to_s)
.and_return(cf)
+
+ allow(scope)
+ .to receive(:pluck)
+ .with(:id)
+ .and_return([cf.id])
end
end
before do
- RequestStore.store[:custom_sortable_project_custom_fields] = "1"
allow(model_instance).to receive(:valid?).and_return(model_valid)
end