2019-04-11 12:17:24 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-04 05:42:52 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 15:08:50 +00:00
|
|
|
RSpec.describe Projects::GitlabProjectsImportService do
|
2020-01-10 09:07:49 +00:00
|
|
|
let_it_be(:namespace) { create(:namespace) }
|
2018-03-29 11:57:21 +00:00
|
|
|
let(:path) { 'test-path' }
|
2018-07-26 10:55:21 +00:00
|
|
|
let(:file) { fixture_file_upload('spec/fixtures/project_export.tar.gz') }
|
2018-04-06 15:23:49 +00:00
|
|
|
let(:overwrite) { false }
|
|
|
|
let(:import_params) { { namespace_id: namespace.id, path: path, file: file, overwrite: overwrite } }
|
2018-07-20 23:25:10 +00:00
|
|
|
|
2018-03-29 11:57:21 +00:00
|
|
|
subject { described_class.new(namespace.owner, import_params) }
|
2018-01-04 05:42:52 +00:00
|
|
|
|
|
|
|
describe '#execute' do
|
2018-07-20 23:25:10 +00:00
|
|
|
it_behaves_like 'gitlab projects import validations'
|
2018-01-04 05:42:52 +00:00
|
|
|
end
|
|
|
|
end
|