Sha256: d7eb78fa5199d7634b212d5c0f46639a3b5f624d35539e0eb39fd1ad3c0a21ff
Contents?: true
Size: 579 Bytes
Versions: 12
Compression:
Stored size: 579 Bytes
Contents
require 'spec_helper' RSpec.describe CanvasSync::Jobs::SyncRolesJob do describe '#perform' do let!(:account) { FactoryGirl.create(:account, canvas_id: 1) } let(:role_params) { open_canvas_fixture('roles') } let(:job_chain) { { jobs: [], global_options: {}} } it 'retrieves all roles from the Canvas API and then invokes the next job' do expect(CanvasSync).to receive(:invoke_next).with(job_chain) expect { CanvasSync::Jobs::SyncRolesJob.perform_now(job_chain, {}) }.to change { Role.count }.by(role_params.length) end end end
Version data entries
12 entries across 12 versions & 1 rubygems