diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-26 18:17:18 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-26 18:17:18 +0300 |
commit | 34283a71d9ac31eb4da0b59d0b25fc2be014bc9c (patch) | |
tree | 4a780bf8d9c57c3b8ce34fc81152d8a87f71d594 /spec/workers/gitlab/github_import | |
parent | 9edf852c3a851d84b85bc94f7a3b41d5ef04dd32 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/gitlab/github_import')
-rw-r--r-- | spec/workers/gitlab/github_import/import_release_attachments_worker_spec.rb | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/spec/workers/gitlab/github_import/import_release_attachments_worker_spec.rb b/spec/workers/gitlab/github_import/import_release_attachments_worker_spec.rb deleted file mode 100644 index 62a9e3446f8..00000000000 --- a/spec/workers/gitlab/github_import/import_release_attachments_worker_spec.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::GithubImport::ImportReleaseAttachmentsWorker, feature_category: :importers do - subject(:worker) { described_class.new } - - describe '#import' do - let(:import_state) { create(:import_state, :started) } - - let(:project) do - instance_double('Project', full_path: 'foo/bar', id: 1, import_state: import_state) - end - - let(:client) { instance_double('Gitlab::GithubImport::Client') } - let(:importer) { instance_double('Gitlab::GithubImport::Importer::NoteAttachmentsImporter') } - - let(:release_hash) do - { - 'record_db_id' => rand(100), - 'record_type' => 'Release', - 'tag' => 'v1.0', - 'text' => <<-TEXT - Some text... - - ![special-image](https://user-images.githubusercontent.com...) - TEXT - } - end - - it 'imports an issue event' do - expect(Gitlab::GithubImport::Importer::NoteAttachmentsImporter) - .to receive(:new) - .with( - an_instance_of(Gitlab::GithubImport::Representation::NoteText), - project, - client - ) - .and_return(importer) - - expect(importer).to receive(:execute) - - expect(Gitlab::GithubImport::ObjectCounter) - .to receive(:increment) - .and_call_original - - worker.import(project, client, release_hash) - end - end -end |