Commit 0fb58f87 authored by Sean McGivern's avatar Sean McGivern

Merge branch '11129-insights-fix-nested-group-spec-mysql' into 'master'

Use nested_group metadata for insights subgroup specs

Closes #11129

See merge request gitlab-org/gitlab-ee!10863
parents ebd2d311 867977c7
...@@ -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