test(auth): add test of admin page access
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Simon Vieille 2023-01-08 21:49:34 +01:00
parent 518c98710e
commit 919edfe664
Signed by: deblan
GPG key ID: 579388D585F70417

18
tests/Core/LoginTest.php Normal file
View file

@ -0,0 +1,18 @@
<?php
namespace App\Tests\Core;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class LoginTest extends WebTestCase
{
public function testLoginRedirect(): void
{
$client = static::createClient();
$crawler = $client->request('GET', '/admin');
$this->assertResponseStatusCodeSame(302);
$client->followRedirect();
$this->assertResponseIsSuccessful();
}
}