canvas_sync 0.17.23 → 0.17.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/canvas_sync/importers/bulk_importer.rb +1 -1
- data/lib/canvas_sync/job_batches/batch.rb +17 -7
- data/lib/canvas_sync/job_batches/batch_aware_job.rb +7 -7
- data/lib/canvas_sync/job_batches/chain_builder.rb +39 -6
- data/lib/canvas_sync/job_batches/context_hash.rb +4 -0
- data/lib/canvas_sync/job_batches/jobs/concurrent_batch_job.rb +12 -9
- data/lib/canvas_sync/job_batches/jobs/managed_batch_job.rb +62 -25
- data/lib/canvas_sync/job_batches/jobs/serial_batch_job.rb +9 -3
- data/lib/canvas_sync/job_batches/sidekiq/web/helpers.rb +1 -1
- data/lib/canvas_sync/job_batches/sidekiq.rb +7 -7
- data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +11 -1
- data/lib/canvas_sync/jobs/sync_terms_job.rb +1 -17
- data/lib/canvas_sync/jobs/term_batches_job.rb +50 -0
- data/lib/canvas_sync/version.rb +1 -1
- data/lib/canvas_sync.rb +31 -8
- data/spec/canvas_sync/processors/provisioning_report_processor_spec.rb +13 -1
- data/spec/dummy/log/test.log +31707 -0
- data/spec/job_batching/batch_aware_job_spec.rb +3 -3
- data/spec/job_batching/batch_spec.rb +1 -1
- data/spec/job_batching/sidekiq_spec.rb +2 -2
- data/spec/support/fixtures/reports/users.csv +3 -2
- data/spec/support/fixtures/reports/xlist.csv +1 -1
- metadata +3 -2
@@ -10,6 +10,11 @@ RSpec.describe CanvasSync::Processors::ProvisioningReportProcessor do
|
|
10
10
|
}.to change { User.count }.by(2)
|
11
11
|
end
|
12
12
|
|
13
|
+
it 'uses a User row with a sis_id' do
|
14
|
+
subject.process('spec/support/fixtures/reports/users.csv', { models: ['users'] }, 1)
|
15
|
+
expect(User.find_by(canvas_id: 2).sis_id).to eq 'sis_id_2'
|
16
|
+
end
|
17
|
+
|
13
18
|
it 'processes courses' do
|
14
19
|
expect {
|
15
20
|
subject.process('spec/support/fixtures/reports/courses.csv', { models: ['courses'] }, 1)
|
@@ -35,11 +40,18 @@ RSpec.describe CanvasSync::Processors::ProvisioningReportProcessor do
|
|
35
40
|
end
|
36
41
|
|
37
42
|
it 'processes xlist' do
|
43
|
+
subject.process('spec/support/fixtures/reports/sections.csv', { models: ['sections'] }, 1)
|
44
|
+
expect(Section.find_by(canvas_id: 2).name).to eq "Lame Section"
|
45
|
+
|
38
46
|
subject.process('spec/support/fixtures/reports/xlist.csv', { models: ['xlist'] }, 1)
|
47
|
+
|
39
48
|
expect(Section.where.not(canvas_nonxlist_course_id: nil).count).to eq 1
|
40
49
|
cross_listed_section = Section.where.not(canvas_nonxlist_course_id: nil).first
|
41
50
|
expect(cross_listed_section.canvas_id).to eq 2
|
42
|
-
expect(cross_listed_section.canvas_nonxlist_course_id).to eq
|
51
|
+
expect(cross_listed_section.canvas_nonxlist_course_id).to eq 3
|
52
|
+
|
53
|
+
expect(cross_listed_section.canvas_course_id).to eq 2
|
54
|
+
expect(cross_listed_section.name).to eq "Lame Section"
|
43
55
|
end
|
44
56
|
|
45
57
|
it 'processes groups' do
|