Sha256: cd39d8ed1df7a486eedfd4a03c206efa1dee52ff2e57a23def231cc54f2e11a8
Contents?: true
Size: 1.13 KB
Versions: 126
Compression:
Stored size: 1.13 KB
Contents
require "spec_helper" RSpec.describe CanvasSync::Jobs::SyncContextModulesJob do describe "#perform" do context "a term id is in the global_options" do it "enqueues a ReportStarter for the proserv_context_modules_csv for the given term" do expect_any_instance_of(Bearcat::Client).to receive(:start_report) .with("self", "proserv_context_modules_csv", { parameters: { enrollment_term_id: 1 } }) .and_return("id" => 1) expect(CanvasSync::Jobs::ReportChecker).to receive(:set).and_call_original set_batch_context(canvas_term_id: 1) CanvasSync::Jobs::SyncContextModulesJob.perform_now({}) end end context "no term id is specified" do it "enqueues a ReportStarter for the proserv_context_modules_csv for all terms" do expect_any_instance_of(Bearcat::Client).to receive(:start_report) .with("self", "proserv_context_modules_csv", { parameters: { } }) .and_return("id" => 1) expect(CanvasSync::Jobs::ReportChecker).to receive(:set).and_call_original CanvasSync::Jobs::SyncContextModulesJob.perform_now({}) end end end end
Version data entries
126 entries across 126 versions & 1 rubygems