Sha256: 577e05683319e59afdb0ce330f8606e781d52e5b700b2b82fa568eb3f6b73d7f

Contents?: true

Size: 685 Bytes

Versions: 30

Compression:

Stored size: 685 Bytes

Contents

require "spec_helper"

RSpec.describe CanvasSync::Jobs::SyncSubmissionsJob do
  describe "#perform" do
    context "a term id is in the global_options" do
      it "enqueues a ReportStarter for the proserv_student_submissions_csv for the given term" do
        expect_any_instance_of(Bearcat::Client).to receive(:start_report)
          .with("self", "proserv_student_submissions_csv", "parameters[enrollment_term_id]" => 1)
          .and_return("id" => 1)

        expect(CanvasSync::Jobs::ReportChecker).to receive(:set).and_call_original

        CanvasSync::Jobs::SyncSubmissionsJob.perform_now({ jobs: [], global_options: { canvas_term_id: 1 } }, {})
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
canvas_sync-0.6.1 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.6.0 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.5.4 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.5.3 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.5.2 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.5.1 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.4.1 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.4.0 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.3.23 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.3.22 spec/canvas_sync/jobs/sync_submissions_job_spec.rb