mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Improved tests for project system
This commit is contained in:
parent
de4c25ac0e
commit
d34dbbbb38
3 changed files with 8 additions and 3 deletions
|
@ -126,5 +126,10 @@ class ApplicationAvailabilityFunctionalTest extends WebTestCase
|
||||||
|
|
||||||
//Webauthn Register
|
//Webauthn Register
|
||||||
yield ['/webauthn/register'];
|
yield ['/webauthn/register'];
|
||||||
|
|
||||||
|
//Projects
|
||||||
|
yield ['/project/1/info'];
|
||||||
|
yield ['/project/1/add_parts'];
|
||||||
|
yield ['/project/1/add_parts?parts=1,2'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ abstract class AbstractAdminControllerTest extends WebTestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
//Test read/list access by access /new overview page
|
//Test read/list access by access /new overview page
|
||||||
$client->request('GET', static::$base_path.'/1');
|
$client->request('GET', static::$base_path.'/1/edit');
|
||||||
$this->assertFalse($client->getResponse()->isRedirect());
|
$this->assertFalse($client->getResponse()->isRedirect());
|
||||||
$this->assertSame($read, $client->getResponse()->isSuccessful(), 'Controller was not successful!');
|
$this->assertSame($read, $client->getResponse()->isSuccessful(), 'Controller was not successful!');
|
||||||
$this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!');
|
$this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!');
|
||||||
|
|
|
@ -29,8 +29,8 @@ use App\Entity\ProjectSystem\Project;
|
||||||
* @group slow
|
* @group slow
|
||||||
* @group DB
|
* @group DB
|
||||||
*/
|
*/
|
||||||
class DeviceControllerTest extends AbstractAdminControllerTest
|
class ProjectControllerTest extends AbstractAdminControllerTest
|
||||||
{
|
{
|
||||||
protected static $base_path = '/en'.'/device';
|
protected static $base_path = '/en'.'/project';
|
||||||
protected static $entity_class = Project::class;
|
protected static $entity_class = Project::class;
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue