2020-10-23 15:08:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe BulkImportWorker do
|
|
|
|
describe '#perform' do
|
|
|
|
it 'executes Group Importer' do
|
2020-11-06 09:08:56 +00:00
|
|
|
bulk_import_id = 1
|
2020-10-23 15:08:42 +00:00
|
|
|
|
2020-11-06 09:08:56 +00:00
|
|
|
expect(BulkImports::Importers::GroupsImporter)
|
|
|
|
.to receive(:new).with(bulk_import_id).and_return(double(execute: true))
|
2020-10-23 15:08:42 +00:00
|
|
|
|
2020-11-06 09:08:56 +00:00
|
|
|
described_class.new.perform(bulk_import_id)
|
2020-10-23 15:08:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|