summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/github_import/importer/lfs_object_importer_spec.rb
blob: 4857f2afbe2629490ecbf98465cd35f95a95be66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'spec_helper'

describe Gitlab::GithubImport::Importer::LfsObjectImporter do
  let(:project) { create(:project) }
  let(:download_link) { "http://www.gitlab.com/lfs_objects/oid" }

  let(:github_lfs_object) do
    Gitlab::GithubImport::Representation::LfsObject.new(
      oid: 'oid', download_link: download_link
    )
  end

  let(:importer) { described_class.new(github_lfs_object, project, nil) }

  describe '#execute' do
    it 'calls the LfsDownloadService with the lfs object attributes' do
      expect_any_instance_of(Projects::LfsPointers::LfsDownloadService)
        .to receive(:execute).with('oid', download_link)

      importer.execute
    end
  end
end