2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe Issues::ImportCsvService do
|
2019-02-15 15:39:39 +05:30
|
|
|
let(:project) { create(:project) }
|
|
|
|
let(:user) { create(:user) }
|
2021-01-29 00:20:46 +05:30
|
|
|
let(:service) do
|
2019-02-15 15:39:39 +05:30
|
|
|
uploader = FileUploader.new(project)
|
|
|
|
uploader.store!(file)
|
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
described_class.new(user, project, uploader)
|
2019-02-15 15:39:39 +05:30
|
|
|
end
|
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
include_examples 'issuable import csv service', 'issue' do
|
|
|
|
let(:issuables) { project.issues }
|
|
|
|
let(:email_method) { :import_issues_csv_email }
|
2019-02-15 15:39:39 +05:30
|
|
|
end
|
|
|
|
end
|