diff options
author | Stan Hu <stanhu@gmail.com> | 2019-01-17 00:35:40 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-02-05 21:33:09 -0800 |
commit | a9ab6dbc637bc0a531760b0425d655a507827db3 (patch) | |
tree | 8260d2e0665248e9ce1c4b09f9f64596738dc45d /spec/lib/gitlab/bitbucket_import | |
parent | 6bac612dc4545abcbbfc86477417f711e02427ba (diff) | |
download | gitlab-ce-a9ab6dbc637bc0a531760b0425d655a507827db3.tar.gz |
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.rb | 9 |
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 |