Commit e31a07b8 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Merge branch 'issue_322000' into 'master'

Move parent_epic quick action specs to correct context

See merge request gitlab-org/gitlab!55212
parents 17a03d7a 3690fbc1
......@@ -582,6 +582,26 @@ RSpec.describe QuickActions::InterpretService do
end
end
context 'parent_epic command' do
let(:epic) { create(:epic, group: group) }
let(:epic2) { create(:epic, group: group) }
let(:referenced_epic) { create(:epic, group: epic.group) }
before do
group.add_developer(current_user)
stub_licensed_features(epics: true, subepics: true)
end
it_behaves_like 'adds quick action parameter', :quick_action_assign_to_parent_epic, :parent_epic
context 'when target epic is not persisted yet' do
let(:epic) { build(:epic, group: group) }
let(:referenced_epic) { epic2 }
it_behaves_like 'adds quick action parameter', :quick_action_assign_to_parent_epic, :parent_epic
end
end
context 'child_epic command' do
let(:subgroup) { create(:group, parent: group) }
let(:another_group) { create(:group) }
......@@ -1259,7 +1279,6 @@ RSpec.describe QuickActions::InterpretService do
context 'parent_epic command' do
let(:referenced_epic) { epic2 }
it_behaves_like 'adds quick action parameter', :quick_action_assign_to_parent_epic, :parent_epic
it_behaves_like 'returns execution messages', :parent
context 'when epic is already a parent epic' do
......@@ -1288,13 +1307,6 @@ RSpec.describe QuickActions::InterpretService do
it_behaves_like 'target epic does not exist', :parent
end
context 'when target epic is not persisted yet' do
let(:epic) { build(:epic, group: group) }
let(:referenced_epic) { epic2 }
it_behaves_like 'adds quick action parameter', :quick_action_assign_to_parent_epic, :parent_epic
end
context 'when user has no permission to read epic' do
let(:content) { "/parent_epic #{epic2&.to_reference(epic)}" }
......
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