mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-01 12:59:36 +00:00
Fix test failures: correct ids format and anonymous access assertion
This commit is contained in:
parent
be2c990286
commit
7e3aa7fed8
4 changed files with 10 additions and 9 deletions
|
|
@ -28,7 +28,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|||
|
||||
#[Group("slow")]
|
||||
#[Group("DB")]
|
||||
class BatchEdaControllerTest extends WebTestCase
|
||||
final class BatchEdaControllerTest extends WebTestCase
|
||||
{
|
||||
private function loginAsUser($client, string $username): void
|
||||
{
|
||||
|
|
@ -48,8 +48,8 @@ class BatchEdaControllerTest extends WebTestCase
|
|||
$client = static::createClient();
|
||||
$this->loginAsUser($client, 'admin');
|
||||
|
||||
// Request with part IDs in session — the page expects ids[] query param
|
||||
$client->request('GET', '/en/tools/batch_eda_edit', ['ids' => [1, 2, 3]]);
|
||||
// Request with part IDs as comma-separated string (controller uses getString)
|
||||
$client->request('GET', '/en/tools/batch_eda_edit', ['ids' => '1,2,3']);
|
||||
|
||||
self::assertResponseIsSuccessful();
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ class BatchEdaControllerTest extends WebTestCase
|
|||
$this->loginAsUser($client, 'admin');
|
||||
|
||||
// Load the form page first
|
||||
$crawler = $client->request('GET', '/en/tools/batch_eda_edit', ['ids' => [1, 2]]);
|
||||
$crawler = $client->request('GET', '/en/tools/batch_eda_edit', ['ids' => '1,2']);
|
||||
|
||||
self::assertResponseIsSuccessful();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue