-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt the unit test action to not use a docker image.
- Loading branch information
Showing
19 changed files
with
128 additions
and
71 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
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
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
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
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
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 |
---|---|---|
|
@@ -42,7 +42,7 @@ my $user_rs = $schema->resultset('User'); | |
# Get a list of users from the CSV file | ||
my @students = loadCSV("$main::ww3_dir/t/db/sample_data/students.csv"); | ||
for my $student (@students) { | ||
$student->{is_admin} = 0; | ||
$student->{is_admin} = false; | ||
$student->{course_user_params} = $student->{params}; | ||
delete $student->{params}; | ||
} | ||
|
@@ -124,7 +124,7 @@ my $user_params = { | |
last_name => 'Quimby', | ||
email => '[email protected]', | ||
student_id => '12345', | ||
is_admin => 0 | ||
is_admin => false | ||
}; | ||
|
||
my $course_user_params = { | ||
|
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 |
---|---|---|
|
@@ -5,8 +5,7 @@ use Mojo::Base -strict; | |
use Test::More; | ||
use Test::Mojo; | ||
use YAML::XS qw/LoadFile/; | ||
|
||
use YAML::XS qw/LoadFile/; | ||
use Mojo::JSON qw/true false/; | ||
|
||
BEGIN { | ||
use File::Basename qw/dirname/; | ||
|
@@ -36,11 +35,11 @@ $t->post_ok('/webwork3/api/login')->status_is(500, 'error status')->content_type | |
$t->post_ok('/webwork3/api/login' => json => { username => 'lisa', password => 'lisa' })->status_is(200) | ||
->content_type_is('application/json;charset=UTF-8')->json_is( | ||
'' => { | ||
logged_in => 1, | ||
logged_in => true, | ||
user => { | ||
email => '[email protected]', | ||
first_name => 'Lisa', | ||
is_admin => 0, | ||
is_admin => false, | ||
last_name => 'Simpson', | ||
student_id => '23', | ||
user_id => 3, | ||
|
@@ -53,7 +52,7 @@ $t->post_ok('/webwork3/api/login' => json => { username => 'lisa', password => ' | |
# Test logout | ||
$t->post_ok('/webwork3/api/logout')->status_is(200)->content_type_is('application/json;charset=UTF-8')->json_is( | ||
'' => { | ||
logged_in => 0, | ||
logged_in => false, | ||
message => 'Successfully logged out.' | ||
}, | ||
'logout' | ||
|
@@ -63,7 +62,7 @@ $t->post_ok('/webwork3/api/logout')->status_is(200)->content_type_is('applicatio | |
$t->post_ok('/webwork3/api/login' => json => { username => 'lisa', password => 'wrong_password' })->status_is(200) | ||
->content_type_is('application/json;charset=UTF-8')->json_is( | ||
'' => { | ||
logged_in => 0, | ||
logged_in => false, | ||
message => 'Incorrect username or password.' | ||
}, | ||
'invalid credentials' | ||
|
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
Oops, something went wrong.