Check owner existence before to create project
This commit is contained in:
@@ -20,6 +20,7 @@ class ProjectProcedureTest extends BaseProcedureTest
|
||||
$this->assertEnableDisableProject();
|
||||
$this->assertEnableDisablePublicAccess();
|
||||
$this->assertRemoveProject();
|
||||
$this->assertCreateProjectWithOwnerId();
|
||||
}
|
||||
|
||||
public function assertGetProjectById()
|
||||
@@ -121,4 +122,23 @@ class ProjectProcedureTest extends BaseProcedureTest
|
||||
$this->assertTrue($this->app->removeProject($this->projectId));
|
||||
$this->assertNull($this->app->getProjectById($this->projectId));
|
||||
}
|
||||
|
||||
public function assertCreateProjectWithOwnerId()
|
||||
{
|
||||
$this->assertFalse($this->app->createProject(array(
|
||||
'name' => 'My project with an owner',
|
||||
'owner_id' => 999,
|
||||
)));
|
||||
|
||||
$projectId = $this->app->createProject(array(
|
||||
'name' => 'My project with an owner',
|
||||
'owner_id' => 1,
|
||||
));
|
||||
|
||||
$this->assertNotFalse($projectId);
|
||||
|
||||
$project = $this->app->getProjectById($projectId);
|
||||
$this->assertEquals($projectId, $project['id']);
|
||||
$this->assertEquals(1, $project['owner_id']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user