initial prototype based on nat-as-server
Some checks failed
PHPUnit / test (push) Has been cancelled
Some checks failed
PHPUnit / test (push) Has been cancelled
This commit is contained in:
27
tests/Integration/CoachesActivityTest.php
Normal file
27
tests/Integration/CoachesActivityTest.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Integration;
|
||||
|
||||
use Tests\Support\DatabaseSeeder;
|
||||
use Tests\Support\QdbTestCase;
|
||||
|
||||
final class CoachesActivityTest extends QdbTestCase
|
||||
{
|
||||
public function testCoachRecentSubmissions(): void
|
||||
{
|
||||
$this->submitFixtureQuestionnaire();
|
||||
$token = $this->api()->loginWebAndGetToken(
|
||||
DatabaseSeeder::SUPERVISOR_USERNAME,
|
||||
DatabaseSeeder::PASSWORD
|
||||
)['token'];
|
||||
$res = $this->api()->withToken($token, 'GET', 'coaches', null, [
|
||||
'coachID' => $this->fixture()->coachId,
|
||||
'recent' => '1',
|
||||
'limit' => '10',
|
||||
]);
|
||||
$this->assertApiOk($res);
|
||||
$this->assertArrayHasKey('submissions', $res['data']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user