Skip to content

Commit d65299a

Browse files
committed
1137: Use authenticated client in test
1 parent d39c21b commit d65299a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/Controller/ApiV1RedirectControllerTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@
44

55
namespace App\Tests\Controller;
66

7-
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
7+
use App\Tests\AbstractBaseApiTestCase;
88

9-
class ApiV1RedirectControllerTest extends WebTestCase
9+
class ApiV1RedirectControllerTest extends AbstractBaseApiTestCase
1010
{
1111
public function testIndex()
1212
{
13-
$client = static::createClient();
13+
$client = $this->getAuthenticatedClient('ROLE_ADMIN');
1414
$crawler = $client->request('GET', '/v1/screens/01GN9PW2Z03V8VQG7SN6Q9R17H');
1515

1616
$this->assertResponseRedirects('/v2/screens/01GN9PW2Z03V8VQG7SN6Q9R17H', 301);
17-
18-
$client->followRedirect();
19-
$this->assertResponseIsSuccessful();
2017
}
2118
}

0 commit comments

Comments
 (0)