summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-18 00:22:33 +0000
committerRobert Speicher <robert@gitlab.com>2017-04-18 00:22:33 +0000
commitbf0717802f9bea5222f0149ebc7a843664a27ef7 (patch)
treeb5175c2cdbd730b13c182905eb8074f0552edfd4 /spec/services
parentdbcfbd68b6b2b4c62ba5381317296b23002e3067 (diff)
downloadgitlab-ce-bf0717802f9bea5222f0149ebc7a843664a27ef7.tar.gz
Does not remove the GitHub remote when importing from GitHub
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/projects/import_service_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/projects/import_service_spec.rb b/spec/services/projects/import_service_spec.rb
index 09cfa36b3b9..852a4ac852f 100644
--- a/spec/services/projects/import_service_spec.rb
+++ b/spec/services/projects/import_service_spec.rb
@@ -54,6 +54,15 @@ describe Projects::ImportService, services: true do
expect(result[:status]).to eq :error
expect(result[:message]).to eq "Error importing repository #{project.import_url} into #{project.path_with_namespace} - Failed to import the repository"
end
+
+ it 'does not remove the GitHub remote' do
+ expect_any_instance_of(Repository).to receive(:fetch_remote).and_return(true)
+ expect_any_instance_of(Gitlab::GithubImport::Importer).to receive(:execute).and_return(true)
+
+ subject.execute
+
+ expect(project.repository.raw_repository.remote_names).to include('github')
+ end
end
context 'with a non Github repository' do