Welcome to mirror list, hosted at ThFree Co, Russian Federation.

base_importer_spec.rb « attachments « importer « github_import « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5e60be44621b49edf647f2f27e02a2e9f3fab6ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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