diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 00:09:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-18 00:09:16 +0300 |
commit | 154b9bae142ba15fec753f44327654595094b879 (patch) | |
tree | 027f8ae024961778d5b00c77a72fe302f985d4f3 /spec/lib/gitlab/github_import | |
parent | 2c156e3c7bbade01c36eee18327f1ced6eebea79 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/github_import')
-rw-r--r-- | spec/lib/gitlab/github_import/importer/repository_importer_spec.rb | 17 |
1 files changed, 12 insertions, 5 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 c65b28fafbf..e26ac7bf81e 100644 --- a/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb @@ -11,10 +11,15 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do double( :wiki, disk_path: 'foo.wiki', - full_path: 'group/foo.wiki' + full_path: 'group/foo.wiki', + repository: wiki_repository ) end + let(:wiki_repository) do + double(:wiki_repository) + end + let(:project) do double( :project, @@ -221,17 +226,19 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do describe '#import_wiki_repository' do it 'imports the wiki repository' do - expect(importer.gitlab_shell) + expect(wiki_repository) .to receive(:import_repository) - .with('foo', 'foo.wiki', 'foo.wiki.git', 'group/foo.wiki') + .with(importer.wiki_url) + .and_return(true) expect(importer.import_wiki_repository).to eq(true) end it 'marks the import as failed and creates an empty repo if an error was raised' do - expect(importer.gitlab_shell) + expect(wiki_repository) .to receive(:import_repository) - .and_raise(Gitlab::Shell::Error) + .with(importer.wiki_url) + .and_raise(Gitlab::Git::CommandError) expect(importer) .to receive(:fail_import) |