coalescing_panda 4.1.17 → 4.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,12 @@ RSpec.describe CoalescingPanda::Workers::CourseMiner, :type => :model do
9
9
  {"id"=>3, "name"=>"student2@test.com", "sortable_name"=>"student2@test.com", "short_name"=>"student2@test.com", "login_id"=>"student2@test.com"}
10
10
  ]}
11
11
 
12
+ let(:courses_response) {[
13
+ {"account_id"=>account.canvas_account_id, "course_code"=>"sub1c1", "enrollment_term_id"=>3, "id"=>1, "is_public"=> false, "name"=>"Course1", "start_at"=>"2015-02-24T19:04:00Z", "end_at"=>nil, "sis_course_id"=>"course_1_sis", "workflow_state"=>"available"},
14
+ {"account_id"=>account.canvas_account_id, "course_code"=>"sub1c2", "enrollment_term_id"=>3, "id"=>2, "is_public"=> false, "name"=>"Course2", "start_at"=>"2015-03-24T19:04:00Z", "end_at"=>nil, "sis_course_id"=>"course_2_sis", "workflow_state"=>"available"}
15
+ ]}
16
+
17
+
12
18
  before do
13
19
  Bearcat::Client.any_instance.stub(:list_users) { double(Bearcat::ApiArray, :all_pages! => users_response) }
14
20
  end
@@ -35,6 +41,12 @@ RSpec.describe CoalescingPanda::Workers::CourseMiner, :type => :model do
35
41
  end
36
42
 
37
43
  describe '#create_records' do
44
+ it 'creates courses' do
45
+ CoalescingPanda::User.destroy_all
46
+ worker.sync_courses(courses_response)
47
+ expect(CoalescingPanda::Course.count).to eq 2
48
+ end
49
+
38
50
  it 'creates users' do
39
51
  CoalescingPanda::User.destroy_all
40
52
  worker.sync_users(users_response)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coalescing_panda
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.17
4
+ version: 4.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills