Sha256: ca393c9e6746e0f0120493bb6bc4aaf69afc1e4dabe7b2a35bbdc0314f117a0c

Contents?: true

Size: 706 Bytes

Versions: 124

Compression:

Stored size: 706 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(: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)

      CanvasSync::Jobs::ReportProcessorJob.perform_now(
        report_name,
        report_url,
        processor,
        {},
        report_id,
      )
    end
  end
end

Version data entries

124 entries across 124 versions & 1 rubygems

Version Path
canvas_sync-0.22.6 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.5 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.4 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.3 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.2 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.1 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.0 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.0.beta8 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.0.beta7 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.0.beta6 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.0.beta5 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.0.beta4 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.0.beta3 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.0.beta2 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.22.0.beta1 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.21.1 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.21.1.beta1 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.21.0 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.21.0.beta5 spec/canvas_sync/jobs/report_processor_job_spec.rb
canvas_sync-0.21.0.beta4 spec/canvas_sync/jobs/report_processor_job_spec.rb