coalescing_panda 3.1.6 → 3.1.7
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.
- checksums.yaml +4 -4
- data/app/models/coalescing_panda/workers/course_miner.rb +17 -13
- data/db/migrate/20141120153135_create_coalescing_panda_enrollments.rb +1 -1
- data/lib/coalescing_panda/version.rb +1 -1
- data/spec/dummy/log/test.log +2942 -0
- data/spec/models/coalescing_panda/enrollment_spec.rb +4 -4
- metadata +1 -1
@@ -31,15 +31,15 @@ RSpec.describe CoalescingPanda::Enrollment, :type => :model do
|
|
31
31
|
it 'should be unique to a user and section' do
|
32
32
|
user = FactoryGirl.create(:user)
|
33
33
|
section = FactoryGirl.create(:section)
|
34
|
-
enrollment = FactoryGirl.create(:enrollment, user: user, section: section,
|
35
|
-
expect { FactoryGirl.create(:enrollment, user: user, section: section,
|
34
|
+
enrollment = FactoryGirl.create(:enrollment, user: user, section: section, enrollment_type: "StudentEnrollment")
|
35
|
+
expect { FactoryGirl.create(:enrollment, user: user, section: section, enrollment_type: "StudentEnrollment") }.to raise_error ActiveRecord::RecordNotUnique
|
36
36
|
end
|
37
37
|
|
38
38
|
it 'should not be unique with a different enrollment type' do
|
39
39
|
user = FactoryGirl.create(:user)
|
40
40
|
section = FactoryGirl.create(:section)
|
41
|
-
enrollment = FactoryGirl.create(:enrollment, user: user, section: section,
|
42
|
-
expect { FactoryGirl.create(:enrollment, user: user, section: section,
|
41
|
+
enrollment = FactoryGirl.create(:enrollment, user: user, section: section, enrollment_type: "StudentEnrollment")
|
42
|
+
expect { FactoryGirl.create(:enrollment, user: user, section: section, enrollment_type: "TeacherEnrollment") }.not_to raise_error
|
43
43
|
end
|
44
44
|
|
45
45
|
it "should be valid with valid data" do
|