Commit 338f1eaf authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Migrate to Project#empty_repo?

parent f5290c97
---
title: Fix GitHub importer using removed interface
merge_request:
author:
type: fixed
......@@ -29,7 +29,7 @@ module Gitlab
# this code, e.g. because we had to retry this job after
# `import_wiki?` raised a rate limit error. In this case we'll skip
# re-importing the main repository.
if project.repository.empty_repo?
if project.empty_repo?
import_repository
else
true
......
......@@ -70,7 +70,7 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
describe '#execute' do
it 'imports the repository and wiki' do
expect(repository)
expect(project)
.to receive(:empty_repo?)
.and_return(true)
......@@ -93,7 +93,7 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
end
it 'does not import the repository if it already exists' do
expect(repository)
expect(project)
.to receive(:empty_repo?)
.and_return(false)
......@@ -115,7 +115,7 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
end
it 'does not import the wiki if it is disabled' do
expect(repository)
expect(project)
.to receive(:empty_repo?)
.and_return(true)
......@@ -137,7 +137,7 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do
end
it 'does not import the wiki if the repository could not be imported' do
expect(repository)
expect(project)
.to receive(:empty_repo?)
.and_return(true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment