Sha256: 80a487ff17fe23be9c6d48f0cb8d92e213d3a3aeaa29b7a4811a188e382de5d1

Contents?: true

Size: 444 Bytes

Versions: 5

Compression:

Stored size: 444 Bytes

Contents

require 'spec_helper'

RSpec.describe CanvasSync::Jobs::SyncRolesJob do
  describe '#perform' do
    let!(:account) { FactoryBot.create(:account, canvas_id: 1) }
    let(:role_params) { open_canvas_fixture('roles') }

    it 'retrieves all roles from the Canvas API and then invokes the next job' do
      expect {
        CanvasSync::Jobs::SyncRolesJob.perform_now({})
      }.to change { Role.count }.by(role_params.length)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
canvas_sync-0.22.6 spec/canvas_sync/jobs/sync_roles_job_spec.rb
canvas_sync-0.22.5 spec/canvas_sync/jobs/sync_roles_job_spec.rb
canvas_sync-0.22.4 spec/canvas_sync/jobs/sync_roles_job_spec.rb
canvas_sync-0.22.3 spec/canvas_sync/jobs/sync_roles_job_spec.rb
canvas_sync-0.22.2 spec/canvas_sync/jobs/sync_roles_job_spec.rb