diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml index fe7b3e6d59160fe6484d6bcc685180951cc3864c..18c4d450ef3514f422ad58e084f7258fe70f45cb 100644 --- a/.rubocop_todo/layout/line_length.yml +++ b/.rubocop_todo/layout/line_length.yml @@ -3499,7 +3499,6 @@ Layout/LineLength: - 'spec/models/postgresql/replication_slot_spec.rb' - 'spec/models/preloaders/environments/deployment_preloader_spec.rb' - 'spec/models/preloaders/group_policy_preloader_spec.rb' - - 'spec/models/preloaders/group_root_ancestor_preloader_spec.rb' - 'spec/models/preloaders/user_max_access_level_in_groups_preloader_spec.rb' - 'spec/models/project_authorization_spec.rb' - 'spec/models/project_feature_spec.rb' diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml index 58154511eb9f4302841252df13ae56ab75548859..697095846410076e4f020fc109954b9193b3f439 100644 --- a/.rubocop_todo/rspec/feature_category.yml +++ b/.rubocop_todo/rspec/feature_category.yml @@ -3374,7 +3374,6 @@ RSpec/FeatureCategory: - 'spec/models/preloaders/commit_status_preloader_spec.rb' - 'spec/models/preloaders/environments/deployment_preloader_spec.rb' - 'spec/models/preloaders/group_policy_preloader_spec.rb' - - 'spec/models/preloaders/group_root_ancestor_preloader_spec.rb' - 'spec/models/preloaders/labels_preloader_spec.rb' - 'spec/models/preloaders/merge_request_diff_preloader_spec.rb' - 'spec/models/preloaders/project_policy_preloader_spec.rb' diff --git a/spec/models/preloaders/group_root_ancestor_preloader_spec.rb b/spec/models/preloaders/group_root_ancestor_preloader_spec.rb index 1f01df4a3ed946bdeb04f4218acd40c8e0460871..f5849d08625e0b25f3c8edcd221675cd6f86ac98 100644 --- a/spec/models/preloaders/group_root_ancestor_preloader_spec.rb +++ b/spec/models/preloaders/group_root_ancestor_preloader_spec.rb @@ -2,14 +2,21 @@ require 'spec_helper' -RSpec.describe Preloaders::GroupRootAncestorPreloader do - let_it_be(:user) { create(:user) } +RSpec.describe Preloaders::GroupRootAncestorPreloader, feature_category: :groups_and_projects do let_it_be(:root_parent1) { create(:group, :private, name: 'root-1', path: 'root-1') } let_it_be(:root_parent2) { create(:group, :private, name: 'root-2', path: 'root-2') } let_it_be(:guest_group) { create(:group, name: 'public guest', path: 'public-guest') } - let_it_be(:private_maintainer_group) { create(:group, :private, name: 'b private maintainer', path: 'b-private-maintainer', parent: root_parent1) } - let_it_be(:private_developer_group) { create(:group, :private, project_creation_level: nil, name: 'c public developer', path: 'c-public-developer') } - let_it_be(:public_maintainer_group) { create(:group, :private, name: 'a public maintainer', path: 'a-public-maintainer', parent: root_parent2) } + let_it_be(:private_maintainer_group) do + create(:group, :private, name: 'b private maintainer', path: 'b-private-maintainer', parent: root_parent1) + end + + let_it_be(:private_developer_group) do + create(:group, :private, project_creation_level: nil, name: 'c public developer', path: 'c-public-developer') + end + + let_it_be(:public_maintainer_group) do + create(:group, :private, name: 'a public maintainer', path: 'a-public-maintainer', parent: root_parent2) + end let(:root_query_regex) do if Feature.enabled?(:use_sql_functions_for_primary_key_lookups, Feature.current_request) diff --git a/spec/models/preloaders/project_root_ancestor_preloader_spec.rb b/spec/models/preloaders/project_root_ancestor_preloader_spec.rb index 2c9221846c8ec87f3f09c64bb5d44e173c6cacfb..d2f66f9d7cbd5682b05e6169be9145d45d64befc 100644 --- a/spec/models/preloaders/project_root_ancestor_preloader_spec.rb +++ b/spec/models/preloaders/project_root_ancestor_preloader_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Preloaders::ProjectRootAncestorPreloader, feature_category: :system_access do +RSpec.describe Preloaders::ProjectRootAncestorPreloader, feature_category: :groups_and_projects do let_it_be(:root_parent1) { create(:group, :private, name: 'root-1', path: 'root-1') } let_it_be(:root_parent2) { create(:group, name: 'root-2', path: 'root-2') } let_it_be(:guest_project) { create(:project, name: 'public guest', path: 'public-guest') } diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml index c20153666e28682e64f85a62b3e9950f2d16658d..ec41169a921f16f7764e2afcf0115a9b23ad1497 100644 --- a/spec/support/rspec_order_todo.yml +++ b/spec/support/rspec_order_todo.yml @@ -6242,7 +6242,6 @@ - './spec/models/preloaders/commit_status_preloader_spec.rb' - './spec/models/preloaders/environments/deployment_preloader_spec.rb' - './spec/models/preloaders/group_policy_preloader_spec.rb' -- './spec/models/preloaders/group_root_ancestor_preloader_spec.rb' - './spec/models/preloaders/labels_preloader_spec.rb' - './spec/models/preloaders/merge_request_diff_preloader_spec.rb' - './spec/models/preloaders/user_max_access_level_in_groups_preloader_spec.rb'