forked from expertiza/expertiza
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Manav Patel
committed
Oct 28, 2024
1 parent
fe917a7
commit 0441b5a
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
end | ||
|
||
it 'raise error if record does not have enough items ' do | ||
row = { username: 'user_name', fullname: 'user_fullname', email: '[email protected]' } | ||
row = { username: 'user_name', name: 'user_name', email: '[email protected]' } | ||
expect { CourseParticipant.import(row, nil, nil, nil) }.to raise_error("The record containing #{row[:username]} does not have enough items.") | ||
end | ||
|
||
|
@@ -38,7 +38,7 @@ | |
row = [] | ||
allow(Course).to receive(:find).and_return(nil) | ||
allow(session[:user]).to receive(:id).and_return(1) | ||
row = { username: 'user_name', fullname: 'user_fullname', email: '[email protected]', password: 'user_password' } | ||
row = { username: 'user_name', name: 'user_name', email: '[email protected]', password: 'user_password' } | ||
expect { CourseParticipant.import(row, nil, session, 2) }.to raise_error('The course with the id "2" was not found.') | ||
end | ||
|
||
|
@@ -48,7 +48,7 @@ | |
row = [] | ||
allow(Course).to receive(:find).and_return(course) | ||
allow(session[:user]).to receive(:id).and_return(1) | ||
row = { username: 'user_name', fullname: 'user_fullname', email: '[email protected]', role: 'user_role_name', parent: 'user_parent_name' } | ||
row = { username: 'user_name', name: 'user_name', email: '[email protected]', role: 'user_role_name', parent: 'user_parent_name' } | ||
course_part = CourseParticipant.import(row, nil, session, 2) | ||
expect(course_part).to be_an_instance_of(CourseParticipant) | ||
end | ||
|