diff options
Diffstat (limited to 'spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb')
-rw-r--r-- | spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb b/spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb index 9aba6a2b02c..f7ee6fee6dc 100644 --- a/spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/issue_events_importer_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe Gitlab::GithubImport::Importer::IssueEventsImporter, feature_category: :importers do subject(:importer) { described_class.new(project, client, parallel: parallel) } - let(:project) { instance_double(Project, id: 4, import_source: 'foo/bar') } + let(:project) { build(:project, id: 4, import_source: 'foo/bar') } let(:client) { instance_double(Gitlab::GithubImport::Client) } let(:parallel) { true } @@ -74,6 +74,10 @@ RSpec.describe Gitlab::GithubImport::Importer::IssueEventsImporter, feature_cate end describe '#parallel_import', :clean_gitlab_redis_cache do + before do + allow(Gitlab::Redis::SharedState).to receive(:with).and_return('OK') + end + it 'imports each note in parallel' do allow(importer).to receive(:each_object_to_import).and_yield(issue_event) |