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/github_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/github_import')
-rw-r--r--spec/lib/gitlab/github_import/importer/repository_importer_spec.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb b/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb
index e3a1c1e6064..47233ea6ee2 100644
--- a/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb
@@ -5,6 +5,14 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
let(:import_state) { double(:import_state) }
let(:client) { double(:client) }
+ let(:wiki) do
+ double(
+ :wiki,
+ disk_path: 'foo.wiki',
+ full_path: 'group/foo.wiki'
+ )
+ end
+
let(:project) do
double(
:project,
@@ -16,7 +24,8 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
create_wiki: true,
import_state: import_state,
full_path: 'group/foo',
- lfs_enabled?: true
+ lfs_enabled?: true,
+ wiki: wiki
)
end
@@ -196,7 +205,7 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
it 'imports the wiki repository' do
expect(importer.gitlab_shell)
.to receive(:import_repository)
- .with('foo', 'foo.wiki', 'foo.wiki.git', 'group/foo')
+ .with('foo', 'foo.wiki', 'foo.wiki.git', 'group/foo.wiki')
expect(importer.import_wiki_repository).to eq(true)
end