mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 14:34:44 -04:00
Fixes for task default task rates
This commit is contained in:
parent
b9457d72e2
commit
83b0f55729
@ -104,32 +104,6 @@ class TaskApiTest extends TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTaskCompanyRateSet()
|
|
||||||
{
|
|
||||||
$settings = $this->company->settings;
|
|
||||||
$settings->default_task_rate = 31;
|
|
||||||
|
|
||||||
$this->company->saveSettings((array)$settings, $this->company);
|
|
||||||
$this->company->push();
|
|
||||||
$this->company->save();
|
|
||||||
|
|
||||||
$data = [
|
|
||||||
'client_id' => $this->client->hashed_id,
|
|
||||||
'description' => 'Test Task',
|
|
||||||
'time_log' => '[[1681165417,1681165432,"sumtin",true],[1681165446,0]]',
|
|
||||||
];
|
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
|
||||||
'X-API-TOKEN' => $this->token,
|
|
||||||
])->postJson("/api/v1/tasks", $data);
|
|
||||||
|
|
||||||
$response->assertStatus(200);
|
|
||||||
$arr = $response->json();
|
|
||||||
|
|
||||||
$this->assertEquals(31, $arr['data']['rate']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testTaskClientRateSet()
|
public function testTaskClientRateSet()
|
||||||
{
|
{
|
||||||
$settings = ClientSettings::defaults();
|
$settings = ClientSettings::defaults();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user