fix unit tests as well as missing code
API CI/CD / Validate (composer + pint) (push) Successful in 2m7s
API CI/CD / Test (PHPUnit) (push) Failing after 2m23s
API CI/CD / Build frontend assets (push) Successful in 2m18s
API CI/CD / Security audit (push) Successful in 31s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 2m7s
API CI/CD / Test (PHPUnit) (push) Failing after 2m23s
API CI/CD / Build frontend assets (push) Successful in 2m18s
API CI/CD / Security audit (push) Successful in 31s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Models\Configuration;
|
||||
use App\Models\Role;
|
||||
use App\Models\SchoolYear;
|
||||
use App\Models\User;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
|
||||
trait CreatesApiTestUsers
|
||||
{
|
||||
@@ -68,6 +69,10 @@ trait CreatesApiTestUsers
|
||||
'status' => 'Active',
|
||||
'is_verified' => 1,
|
||||
'is_suspended' => 0,
|
||||
'address_street' => '1 Test Street',
|
||||
'city' => 'Brooklyn',
|
||||
'state' => 'NY',
|
||||
'zip' => '11201',
|
||||
'email' => $roleName.'-api-test-'.str_replace('.', '', uniqid('', true)).'@example.test',
|
||||
], $overrides));
|
||||
|
||||
@@ -81,6 +86,7 @@ trait CreatesApiTestUsers
|
||||
{
|
||||
$user = $this->createApiUserWithRole('administrator');
|
||||
$this->actingAs($user, 'api');
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user