Sha256: f1a19d2b983e2d3c4bf7c22396d4ff4453fcb4c7ebfe0aa480f230df34ecb35c

Contents?: true

Size: 519 Bytes

Versions: 48

Compression:

Stored size: 519 Bytes

Contents

require 'spec_helper'

RSpec.describe CanvasSync::Jobs::SyncAdminsJob do
  describe '#perform' do
    let(:admin_params) { open_canvas_fixture('admins') }
    let(:job_chain) { { jobs: [], global_options: {}} }

    it 'retrieves all terms from the Canvas API and then invokes the next job' do
      expect(CanvasSync).to receive(:invoke_next).with(job_chain)

      expect {
        CanvasSync::Jobs::SyncAdminsJob.perform_now(job_chain, {})
      }.to change { Admin.count }.by(admin_params.length)
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
canvas_sync-0.6.4 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.6.3 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.6.2 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.6.1 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.6.0 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.5.4 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.5.3 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.5.2 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.5.1 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.4.1 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.4.0 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.3.23 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.3.22 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.3.21 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.3.20 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.3.19 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.3.18 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.3.17 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.3.16 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.3.15 spec/canvas_sync/jobs/sync_admins_job_spec.rb