Sha256: d7911d77e9ae6fc57b4d56357f7bd943a23f2312d641e574b82e25ff3cb73bd7

Contents?: true

Size: 513 Bytes

Versions: 50

Compression:

Stored size: 513 Bytes

Contents

require 'spec_helper'

RSpec.describe CanvasSync::Jobs::SyncRolesJob do
  describe '#perform' do
    let(:role_params) { open_canvas_fixture('roles') }
    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::SyncRolesJob.perform_now(job_chain, {})
      }.to change { Role.count }.by(role_params.length)
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

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