diff options
Diffstat (limited to 'spec/lib/gitlab/github_import')
-rw-r--r-- | spec/lib/gitlab/github_import/importer/repository_importer_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/github_import/parallel_importer_spec.rb | 4 |
2 files changed, 6 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 879b1d9fb0f..cc9e4b67e72 100644 --- a/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' describe Gitlab::GithubImport::Importer::RepositoryImporter do let(:repository) { double(:repository) } + let(:import_state) { double(:import_state) } let(:client) { double(:client) } let(:project) do @@ -12,7 +13,8 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do repository_storage: 'foo', disk_path: 'foo', repository: repository, - create_wiki: true + create_wiki: true, + import_state: import_state ) end diff --git a/spec/lib/gitlab/github_import/parallel_importer_spec.rb b/spec/lib/gitlab/github_import/parallel_importer_spec.rb index e2a821d4d5c..20b48c1de68 100644 --- a/spec/lib/gitlab/github_import/parallel_importer_spec.rb +++ b/spec/lib/gitlab/github_import/parallel_importer_spec.rb @@ -12,6 +12,8 @@ describe Gitlab::GithubImport::ParallelImporter do let(:importer) { described_class.new(project) } before do + create(:import_state, :started, project: project) + expect(Gitlab::GithubImport::Stage::ImportRepositoryWorker) .to receive(:perform_async) .with(project.id) @@ -34,7 +36,7 @@ describe Gitlab::GithubImport::ParallelImporter do it 'updates the import JID of the project' do importer.execute - expect(project.import_jid).to eq("github-importer/#{project.id}") + expect(project.reload.import_jid).to eq("github-importer/#{project.id}") end end end |