Sha256: 8a4044771b069d33ebb8b3c6f42382bdb4ec5cbc5a38085a5be45ae48dc8a979

Contents?: true

Size: 451 Bytes

Versions: 7

Compression:

Stored size: 451 Bytes

Contents

require 'spec_helper'

RSpec.describe CanvasSync::Jobs::SyncAdminsJob do
  describe '#perform' do
    let!(:account) { FactoryBot.create(:account, canvas_id: 1) }
    let(:admin_params) { open_canvas_fixture('admins') }

    it 'retrieves all admins from the Canvas API and then invokes the next job' do
      expect {
        CanvasSync::Jobs::SyncAdminsJob.perform_now({})
      }.to change { Admin.count }.by(admin_params.length)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
canvas_sync-0.22.9 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.22.8 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.22.6 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.22.5 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.22.4 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.22.3 spec/canvas_sync/jobs/sync_admins_job_spec.rb
canvas_sync-0.22.2 spec/canvas_sync/jobs/sync_admins_job_spec.rb