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 concern include breaking included methods

Oliver Günther18527ed7cce7
diff --git a/app/controllers/admin/settings/enumerations_controller_base.rb b/app/controllers/admin/settings/enumerations_controller_base.rb
index 214e0ce9422..eda3fef90ce 100644
--- a/app/controllers/admin/settings/enumerations_controller_base.rb
+++ b/app/controllers/admin/settings/enumerations_controller_base.rb
@@ -31,7 +31,6 @@
module Admin
module Settings
class EnumerationsControllerBase < ApplicationController
- extend ActiveSupport::Concern
include OpTurbo::ComponentStream
before_action :require_admin
diff --git a/modules/documents/spec/requests/admin/settings/document_categories_spec.rb b/modules/documents/spec/requests/admin/settings/document_categories_spec.rb
index 8225ba50b0f..0bf374ac7e6 100644
--- a/modules/documents/spec/requests/admin/settings/document_categories_spec.rb
+++ b/modules/documents/spec/requests/admin/settings/document_categories_spec.rb
@@ -88,4 +88,13 @@ RSpec.describe "Document categories",
end
end
end
+
+ describe "PUT /admin/settings/document_categories/:id/move" do
+ it "moves the category to the bottom" do
+ put move_admin_settings_document_category_path(category), params: { move_to: "lowest" }, as: :turbo_stream
+
+ expect(response).to have_http_status(:ok)
+ expect(category.reload.position).to be > other_category.reload.position
+ end
+ end
end
diff --git a/spec/requests/admin/settings/work_package_priorities_spec.rb b/spec/requests/admin/settings/work_package_priorities_spec.rb
index 56630e8371d..0c02e87e344 100644
--- a/spec/requests/admin/settings/work_package_priorities_spec.rb
+++ b/spec/requests/admin/settings/work_package_priorities_spec.rb
@@ -88,4 +88,13 @@ RSpec.describe "Work package priorities",
end
end
end
+
+ describe "PUT /admin/settings/work_package_priorities/:id/move" do
+ it "moves the category to the bottom" do
+ put move_admin_settings_work_package_priority_path(priority), params: { move_to: "lowest" }, as: :turbo_stream
+
+ expect(response).to have_http_status(:ok)
+ expect(priority.reload.position).to be > other_priority.reload.position
+ end
+ end
end