support budget and timeBudget in API calls (#1658)

This commit is contained in:
Kevin Papst
2020-04-23 18:49:48 +02:00
committed by GitHub
parent f8331b74c7
commit 0debc70ead
6 changed files with 29 additions and 7 deletions

View File

@@ -188,7 +188,9 @@ class ActivityControllerTest extends APIControllerBaseTest
$data = [
'name' => 'foo',
'project' => 1,
'visible' => true
'visible' => true,
'budget' => '999',
'timeBudget' => '7200',
];
$this->request($client, '/api/activities', 'POST', [], json_encode($data));
$this->assertTrue($client->getResponse()->isSuccessful());
@@ -236,7 +238,9 @@ class ActivityControllerTest extends APIControllerBaseTest
'name' => 'foo',
'comment' => '',
'project' => 1,
'visible' => true
'visible' => true,
'budget' => '999',
'timeBudget' => '7200',
];
$this->request($client, '/api/activities/1', 'PATCH', [], json_encode($data));
$this->assertTrue($client->getResponse()->isSuccessful());

View File

@@ -124,6 +124,8 @@ class CustomerControllerTest extends APIControllerBaseTest
'country' => 'DE',
'currency' => 'EUR',
'timezone' => 'Europe/Berlin',
'budget' => '999',
'timeBudget' => '7200',
];
$this->request($client, '/api/customers', 'POST', [], json_encode($data));
$this->assertTrue($client->getResponse()->isSuccessful());
@@ -178,6 +180,8 @@ class CustomerControllerTest extends APIControllerBaseTest
'country' => 'DE',
'currency' => 'EUR',
'timezone' => 'Europe/Berlin',
'budget' => '999',
'timeBudget' => '7200',
];
$this->request($client, '/api/customers/1', 'PATCH', [], json_encode($data));
$this->assertTrue($client->getResponse()->isSuccessful());

View File

@@ -187,6 +187,8 @@ class ProjectControllerTest extends APIControllerBaseTest
'orderDate' => '2018-02-08T13:02:54',
'start' => '2019-02-01T19:32:17',
'end' => '2020-02-08T21:11:42',
'budget' => '999',
'timeBudget' => '7200',
];
$this->request($client, '/api/projects', 'POST', [], json_encode($data));
$this->assertTrue($client->getResponse()->isSuccessful());
@@ -237,7 +239,9 @@ class ProjectControllerTest extends APIControllerBaseTest
'name' => 'foo',
'comment' => '',
'customer' => 1,
'visible' => true
'visible' => true,
'budget' => '999',
'timeBudget' => '7200',
];
$this->request($client, '/api/projects/1', 'PATCH', [], json_encode($data));
$this->assertTrue($client->getResponse()->isSuccessful());