Sha256: 21c1570385bf2237079f697347585ae22226d72d561d2013b238a6ea059173c3
Contents?: true
Size: 846 Bytes
Versions: 32
Compression:
Stored size: 846 Bytes
Contents
require 'spec_helper' class FakeProcessor; end; RSpec.describe CanvasSync::Jobs::ReportProcessorJob do let(:report_name) { 'provisioning_csv' } let(:report_url) { 'https://test.instructure.com/sample_report_download' } let(:processor) { FakeProcessor.to_s } let(:job_chain) { { jobs: [], global_options: {} } } let(:report_id) { 1 } describe '#perform' do it 'downloads the report to a file and then calls the process method on the processor, and then invokes the next job' do expect(IO).to receive(:copy_stream) expect(FakeProcessor).to receive(:process) expect(CanvasSync).to receive(:invoke_next).with(job_chain) CanvasSync::Jobs::ReportProcessorJob.perform_now( job_chain, report_name, report_url, processor, {}, report_id, ) end end end
Version data entries
32 entries across 32 versions & 1 rubygems