Sha256: 30c1743ddd827e1066d93c9db196fc4d05c1f839a98e452c6e72299a30bb5e0a

Contents?: true

Size: 662 Bytes

Versions: 7

Compression:

Stored size: 662 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", 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: { term_id: 1 } }, {})
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
canvas_sync-0.3.20 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.3.19 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.3.18 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.3.17 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.3.16 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.3.15 spec/canvas_sync/jobs/sync_submissions_job_spec.rb
canvas_sync-0.3.14 spec/canvas_sync/jobs/sync_submissions_job_spec.rb