diff options
author | James Lopez <james@jameslopez.es> | 2017-12-22 19:21:13 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-01-02 12:42:18 +0300 |
commit | 02276f7a70466f08bef2c233b321bee00727b8c2 (patch) | |
tree | 995c8f463435d1519f5b2ba519be4d9a19c7cf3c /spec/lib/gitlab/bare_repository_import | |
parent | ac35636f4ad92a2f3080af556ad8cfadf73ce977 (diff) |
Fix import scheduled on bare repo import
Diffstat (limited to 'spec/lib/gitlab/bare_repository_import')
-rw-r--r-- | spec/lib/gitlab/bare_repository_import/importer_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/bare_repository_import/importer_spec.rb b/spec/lib/gitlab/bare_repository_import/importer_spec.rb index 8a83e446935..920819cf382 100644 --- a/spec/lib/gitlab/bare_repository_import/importer_spec.rb +++ b/spec/lib/gitlab/bare_repository_import/importer_spec.rb @@ -68,6 +68,12 @@ describe Gitlab::BareRepositoryImport::Importer, repository: true do expect(Project.find_by_full_path(project_path)).not_to be_nil end + it 'does not schedule an import' do + expect_any_instance_of(Project).not_to receive(:import_schedule) + + importer.create_project_if_needed + end + it 'creates the Git repo in disk' do FileUtils.mkdir_p(File.join(base_dir, "#{project_path}.git")) @@ -161,6 +167,8 @@ describe Gitlab::BareRepositoryImport::Importer, repository: true do FileUtils.mkdir_p(File.join(base_dir, "#{project_path}.git")) FileUtils.mkdir_p(File.join(base_dir, "#{project_path}.wiki.git")) + expect(Projects::CreateService).to receive(:new).with(admin, hash_including(skip_import: true)).and_call_original + importer.create_project_if_needed project = Project.find_by_full_path(project_path) |