mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Fixed tests
This commit is contained in:
parent
49ae906029
commit
2b793bf242
2 changed files with 6 additions and 3 deletions
|
@ -59,7 +59,7 @@ class ScanController extends AbstractController
|
|||
{
|
||||
}
|
||||
|
||||
#[Route(path: '/', name: 'scan_dialog')]
|
||||
#[Route(path: '', name: 'scan_dialog')]
|
||||
public function dialog(Request $request, #[MapQueryParameter] ?string $input = null): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('@tools.label_scanner');
|
||||
|
|
|
@ -30,14 +30,17 @@ class ScanControllerTest extends WebTestCase
|
|||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->client = static::createClient();
|
||||
$this->client = static::createClient([], [
|
||||
'PHP_AUTH_USER' => 'admin',
|
||||
'PHP_AUTH_PW' => 'test',
|
||||
]);
|
||||
$this->client->disableReboot();
|
||||
$this->client->catchExceptions(false);
|
||||
}
|
||||
|
||||
public function testRedirectOnInputParameter(): void
|
||||
{
|
||||
$this->client->request('GET', '/en/scan/?input=0000001');
|
||||
$this->client->request('GET', '/en/scan?input=0000001');
|
||||
$this->assertResponseRedirects('/en/part/1');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue