Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-01-17 11:35:40 +0300
committerStan Hu <stanhu@gmail.com>2019-02-06 08:33:09 +0300
commita9ab6dbc637bc0a531760b0425d655a507827db3 (patch)
tree8260d2e0665248e9ce1c4b09f9f64596738dc45d /spec/lib/gitlab/bitbucket_import
parent6bac612dc4545abcbbfc86477417f711e02427ba (diff)
Refactor use of Shell.import_repository for Wikis
The previous behavior would pass in a list of parameters to Shell, but we can improve this by using the WikiFormatter and Project models to give us the same information.
Diffstat (limited to 'spec/lib/gitlab/bitbucket_import')
-rw-r--r--spec/lib/gitlab/bitbucket_import/importer_spec.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/lib/gitlab/bitbucket_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_import/importer_spec.rb
index 034e65ddfeb..c432cc223b9 100644
--- a/spec/lib/gitlab/bitbucket_import/importer_spec.rb
+++ b/spec/lib/gitlab/bitbucket_import/importer_spec.rb
@@ -218,7 +218,7 @@ describe Gitlab::BitbucketImport::Importer do
describe 'wiki import' do
it 'is skipped when the wiki exists' do
expect(project.wiki).to receive(:repository_exists?) { true }
- expect(importer.gitlab_shell).not_to receive(:import_repository)
+ expect(importer.gitlab_shell).not_to receive(:import_wiki_repository)
importer.execute
@@ -227,12 +227,7 @@ describe Gitlab::BitbucketImport::Importer do
it 'imports to the project disk_path' do
expect(project.wiki).to receive(:repository_exists?) { false }
- expect(importer.gitlab_shell).to receive(:import_repository).with(
- project.repository_storage,
- project.wiki.disk_path,
- project.import_url + '/wiki',
- project.full_path
- )
+ expect(importer.gitlab_shell).to receive(:import_wiki_repository)
importer.execute