mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
remove unnecessary include
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
#++
|
||||
|
||||
class UserCustomField < CustomField
|
||||
includes Scopes::Scoped
|
||||
|
||||
scopes :visible
|
||||
|
||||
def type_name
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user