Sha256: 132e31b7bf7a1f692b302c4a4c77b83c04b63724a36c179b929e8dfffe4ac5aa

Contents?: true

Size: 533 Bytes

Versions: 71

Compression:

Stored size: 533 Bytes

Contents

require 'spec_helper'

RSpec.describe CanvasSync::Jobs::SyncTermsJob do
  describe '#perform' do
    let(:term_params) { open_canvas_fixture('terms')['enrollment_terms'] }
    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::SyncTermsJob.perform_now(job_chain, {})
      }.to change { Term.count }.by(term_params.length)
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
canvas_sync-0.11.1 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.16.5 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.16.4 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.16.3 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.16.2 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.16.1 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.15.1 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.15.0 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.14.0 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.13.0 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.12.0 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.11.0 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.10.6 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.10.5 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.10.4 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.10.3 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.10.2 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.10.0 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.9.4 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.9.3 spec/canvas_sync/jobs/sync_terms_job_spec.rb