Sha256: 1a48ecbeacef740fea8a39836c50e811e5b5a3265be6f5dd64839acea981689a
Contents?: true
Size: 586 Bytes
Versions: 12
Compression:
Stored size: 586 Bytes
Contents
require 'spec_helper' RSpec.describe CanvasSync::Jobs::SyncAdminsJob do describe '#perform' do let!(:account) { FactoryGirl.create(:account, canvas_id: 1) } let(:admin_params) { open_canvas_fixture('admins') } let(:job_chain) { { jobs: [], global_options: {}} } it 'retrieves all admins 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
12 entries across 12 versions & 1 rubygems