Display meta-fields in datatables (#1116)

This commit is contained in:
Kevin Papst
2019-09-19 20:28:31 +02:00
committed by GitHub
parent 24cbe3d281
commit 5aa422dde1
71 changed files with 1461 additions and 212 deletions

View File

@@ -164,6 +164,20 @@ class ActivityControllerTest extends APIControllerBaseTest
$this->assertEquals('User cannot create activities', $json['message']);
}
public function testPostActionWithInvalidData()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
$data = [
'name' => 'foo',
'project' => 100,
'unexpected' => 'foo-bar',
'visible' => true
];
$this->request($client, '/api/activities', 'POST', [], json_encode($data));
$response = $client->getResponse();
$this->assertApiCallValidationError($response, ['project'], true);
}
public function testPatchAction()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);