diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
commit | ee664acb356f8123f4f6b00b73c1e1cf0866c7fb (patch) | |
tree | f8479f94a28f66654c6a4f6fb99bad6b4e86a40e /spec/lib/gitlab/github_import/importer/attachments/base_importer_spec.rb | |
parent | 62f7d5c5b69180e82ae8196b7b429eeffc8e7b4f (diff) |
Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42
Diffstat (limited to 'spec/lib/gitlab/github_import/importer/attachments/base_importer_spec.rb')
-rw-r--r-- | spec/lib/gitlab/github_import/importer/attachments/base_importer_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/lib/gitlab/github_import/importer/attachments/base_importer_spec.rb b/spec/lib/gitlab/github_import/importer/attachments/base_importer_spec.rb new file mode 100644 index 00000000000..5e60be44621 --- /dev/null +++ b/spec/lib/gitlab/github_import/importer/attachments/base_importer_spec.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Gitlab::GithubImport::Importer::Attachments::BaseImporter do + subject(:importer) { importer_class.new(project, client) } + + let(:project) { instance_double(Project, id: 1) } + let(:client) { instance_double(Gitlab::GithubImport::Client) } + let(:importer_class) do + Class.new(described_class) do + private + + def collection_method + 'test' + end + end + end + + describe '#each_object_to_import' do + context 'with not implemented #collection interface' do + it 'raises NotImplementedError' do + expect { importer.each_object_to_import } + .to raise_error(Gitlab::GithubImport::Exceptions::NotImplementedError, '#collection') + end + end + end +end |