Commit 867977c7 authored by Mark Fletcher's avatar Mark Fletcher

Use nested_group metadata for subgroup specs

parent b1fb5b7e
...@@ -121,9 +121,8 @@ RSpec.describe Gitlab::Insights::Finders::IssuableFinder do ...@@ -121,9 +121,8 @@ RSpec.describe Gitlab::Insights::Finders::IssuableFinder do
end end
end end
context 'for a group' do shared_examples_for 'group tests' do
let(:entity) { create(:group) } let(:entity) { create(:group) }
let(:project) { create(:project, :public, group: create(:group, parent: entity)) }
let(:label_type) { :group_label } let(:label_type) { :group_label }
let(:label_entity_association_key) { :group } let(:label_entity_association_key) { :group }
...@@ -152,6 +151,18 @@ RSpec.describe Gitlab::Insights::Finders::IssuableFinder do ...@@ -152,6 +151,18 @@ RSpec.describe Gitlab::Insights::Finders::IssuableFinder do
end end
end end
context 'for a group' do
include_examples 'group tests' do
let(:project) { create(:project, :public, group: entity) }
end
end
context 'for a group with subgroups', :nested_groups do
include_examples 'group tests' do
let(:project) { create(:project, :public, group: create(:group, parent: entity)) }
end
end
context 'for a project' do context 'for a project' do
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:entity) { project } let(:entity) { project }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment