remove unnecessary include

This commit is contained in:
ulferts
2026-02-24 11:34:58 +01:00
parent cf92f2f29b
commit 08b092f876
4 changed files with 3 additions and 7 deletions
-2
View File
@@ -46,8 +46,6 @@ class ProjectCustomField < CustomField
has_one :role, through: :custom_fields_role
accepts_nested_attributes_for :custom_fields_role, allow_destroy: true
include Scopes::Scoped
scopes :visible
scope :user_field_with_assigned_role, -> do
-2
View File
@@ -29,8 +29,6 @@
#++
class UserCustomField < CustomField
includes Scopes::Scoped
scopes :visible
def type_name
-2
View File
@@ -40,8 +40,6 @@ class WorkPackageCustomField < CustomField
source: :customized,
source_type: "WorkPackage"
include Scopes::Scoped
scopes :visible,
:on_visible_type_and_project
@@ -38,7 +38,9 @@ RSpec.describe WorkPackageCustomFields::Scopes::Visible do
subject { WorkPackageCustomField.visible(user) }
context "when the user has the select_custom_field_permission in any project" do
let!(:project_with_select_permissions) { create(:project, member_with_permissions: { user => :select_custom_fields }) }
let!(:project_with_select_permissions) { create(:project) }
let(:user) { create(:user, member_with_permissions: { project_with_select_permissions => [:select_custom_fields] }) }
it "returns all custom fields" do
expect(subject).to contain_exactly(type_enabled_and_member_cf,