diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 15:09:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 15:09:13 +0300 |
commit | 1363ca12f1f07c634647cf55c4c16b7401098673 (patch) | |
tree | d932caf09c8148322edb51ae954ed159ff7d00f8 /spec/services | |
parent | 6763d2787670bc03a36a8eb601703e88fc70dece (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/milestones/transfer_service_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/milestones/transfer_service_spec.rb b/spec/services/milestones/transfer_service_spec.rb index 9b087b07cea..9f94d2d320b 100644 --- a/spec/services/milestones/transfer_service_spec.rb +++ b/spec/services/milestones/transfer_service_spec.rb @@ -40,6 +40,16 @@ describe Milestones::TransferService do expect(new_milestone.project_milestone?).to be_truthy end + context 'when milestone is from an ancestor group' do + let(:old_group_ancestor) { create(:group) } + let(:old_group) { create(:group, parent: old_group_ancestor) } + let(:group_milestone) { create(:milestone, group: old_group_ancestor)} + + it 'recreates the missing group milestones at project level' do + expect { service.execute }.to change(project.milestones, :count).by(1) + end + end + it 'deletes milestone issue counters cache for both milestones' do new_milestone = create(:milestone, project: project, title: group_milestone.title) |