summaryrefslogtreecommitdiff
path: root/spec/services/projects
diff options
context:
space:
mode:
authorEugenia Grieff <egrieff@gitlab.com>2019-09-04 16:19:31 +0000
committerMichael Kozono <mkozono@gmail.com>2019-09-04 16:19:31 +0000
commit7a3234c68ffa84893333f00021b6dac6453f20cd (patch)
tree5d1c19b0ccdf65aa26a225a71f9027e31a50f741 /spec/services/projects
parentea4e9ada64091e186969d9656c74c7923652fcad (diff)
downloadgitlab-ce-7a3234c68ffa84893333f00021b6dac6453f20cd.tar.gz
Add service to transfer group milestones
- Add new service that transfers milestones from a group to a project - Include new service in Projects transfer service - Include FromUnion module in Milestone model to use in transfer service - Add specs for new milestones service - Add specs for transferring milestones in project transfer service
Diffstat (limited to 'spec/services/projects')
-rw-r--r--spec/services/projects/transfer_service_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb
index a47c10d991a..6b906f9372c 100644
--- a/spec/services/projects/transfer_service_spec.rb
+++ b/spec/services/projects/transfer_service_spec.rb
@@ -259,7 +259,7 @@ describe Projects::TransferService do
end
context 'missing group labels applied to issues or merge requests' do
- it 'delegates tranfer to Labels::TransferService' do
+ it 'delegates transfer to Labels::TransferService' do
group.add_owner(user)
expect_any_instance_of(Labels::TransferService).to receive(:execute).once.and_call_original
@@ -268,6 +268,17 @@ describe Projects::TransferService do
end
end
+ context 'missing group milestones applied to issues or merge requests' do
+ it 'delegates transfer to Milestones::TransferService' do
+ group.add_owner(user)
+
+ expect(Milestones::TransferService).to receive(:new).with(user, project.group, project).and_call_original
+ expect_any_instance_of(Milestones::TransferService).to receive(:execute).once
+
+ transfer_project(project, user, group)
+ end
+ end
+
context 'when hashed storage in use' do
let(:hashed_project) { create(:project, :repository, namespace: user.namespace) }