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