just testing the environment
Some checks failed
Tests / test (push) Has been cancelled

This commit is contained in:
tom.hempel
2026-05-20 07:10:08 +02:00
parent 2a11dfd0d1
commit 06fc134299
56 changed files with 1890 additions and 361 deletions

View File

@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace Tests\Integration;
use Tests\Support\ApiTestCase;
use Tests\Support\DatabaseFixture;
final class QuestionnairesTest extends ApiTestCase
{
public function testRequiresAuth(): void
{
$res = $this->api('GET', 'questionnaires');
$this->assertLegacyAuthError($res, 401, 'Missing Bearer token');
}
public function testAdminCanListQuestionnaires(): void
{
$this->loginAs(DatabaseFixture::ADMIN_USERNAME);
$res = $this->api('GET', 'questionnaires');
$this->assertOk($res);
$this->assertNotEmpty($res['body']['data']['questionnaires'] ?? []);
}
}