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.5.1 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.4.1 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.4.0 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.23 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.22 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.21 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.20 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.19 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.18 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.17 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.16 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.15 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.14 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.13 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.12 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.11 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.10 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.9 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.8 spec/canvas_sync/jobs/sync_terms_job_spec.rb
canvas_sync-0.3.7 spec/canvas_sync/jobs/sync_terms_job_spec.rb