test(auth): add test of admin page access
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
518c98710e
commit
919edfe664
18
tests/Core/LoginTest.php
Normal file
18
tests/Core/LoginTest.php
Normal 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();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue