Sha256: 76e22573f88b88e1ba6aa6dbcfd03e5aef6155b66852091bfd71570f24c8b1ac
Contents?: true
Size: 1.18 KB
Versions: 69
Compression:
Stored size: 1.18 KB
Contents
require "spec_helper" RSpec.describe CanvasSync::Jobs::SyncContentMigrationsJob do describe "#perform" do context "no parameters is specified" do it "enqueues a ReportStarter for the proserv_content_migrations_csv" do expect_any_instance_of(Bearcat::Client).to receive(:start_report) .with("self", "proserv_content_migrations_csv", { parameters: { } }) .and_return("id" => 1) expect(CanvasSync::Jobs::ReportChecker).to receive(:set).and_call_original CanvasSync::Jobs::SyncContentMigrationsJob.perform_now({}) end end context "updated_after parameters is specified" do it "enqueues a ReportStarter for the proserv_content_migrations_csv and get data from given date" do expect_any_instance_of(Bearcat::Client).to receive(:start_report) .with("self", "proserv_content_migrations_csv", { parameters: { updated_after: 6.hours.ago.to_s } }) .and_return("id" => 1) expect(CanvasSync::Jobs::ReportChecker).to receive(:set).and_call_original set_batch_context(updated_after: 6.hours.ago.to_s) CanvasSync::Jobs::SyncContentMigrationsJob.perform_now({}) end end end end
Version data entries
69 entries across 69 versions & 1 rubygems