diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-12-19 17:18:26 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-01-03 16:13:31 -0200 |
commit | bd90330740e0ea5c0ce0672fd605a463fcdfc898 (patch) | |
tree | 3c7353a654c8e06bbdd3b38cb967fb227aec47ad /spec/services/projects/transfer_service_spec.rb | |
parent | 64fe954dcebaadd6f686f30eb4ff0be5ebcf172d (diff) | |
download | gitlab-ce-bd90330740e0ea5c0ce0672fd605a463fcdfc898.tar.gz |
Update project full path in .git/config when transfering a project
Diffstat (limited to 'spec/services/projects/transfer_service_spec.rb')
-rw-r--r-- | spec/services/projects/transfer_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb index 2b1337bee7e..7377c748698 100644 --- a/spec/services/projects/transfer_service_spec.rb +++ b/spec/services/projects/transfer_service_spec.rb @@ -54,6 +54,12 @@ describe Projects::TransferService do expect(project.disk_path).not_to eq(old_path) expect(project.disk_path).to start_with(group.path) end + + it 'updates project full path in .git/config' do + transfer_project(project, user, group) + + expect(project.repo.config['gitlab.fullpath']).to eq "#{group.full_path}/#{project.path}" + end end context 'when transfer fails' do @@ -86,6 +92,12 @@ describe Projects::TransferService do expect(original_path).to eq current_path end + it 'rolls back project full path in .git/config' do + attempt_project_transfer + + expect(project.repo.config['gitlab.fullpath']).to eq project.full_path + end + it "doesn't send move notifications" do expect_any_instance_of(NotificationService).not_to receive(:project_was_moved) |