mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 07:25:32 +01:00
Improved tests for project system
This commit is contained in:
@@ -126,5 +126,10 @@ class ApplicationAvailabilityFunctionalTest extends WebTestCase
|
||||
|
||||
//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
|
||||
$client->request('GET', static::$base_path.'/1');
|
||||
$client->request('GET', static::$base_path.'/1/edit');
|
||||
$this->assertFalse($client->getResponse()->isRedirect());
|
||||
$this->assertSame($read, $client->getResponse()->isSuccessful(), 'Controller was not successful!');
|
||||
$this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!');
|
||||
|
||||
@@ -29,8 +29,8 @@ use App\Entity\ProjectSystem\Project;
|
||||
* @group slow
|
||||
* @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;
|
||||
}
|
||||
Reference in New Issue
Block a user