Removed option to update billable rate without updating time entries

This commit is contained in:
Constantin Graf
2024-07-15 14:01:33 +02:00
committed by Constantin Graf
parent be50397775
commit 1dc35f1f55
14 changed files with 22 additions and 58 deletions

View File

@@ -507,7 +507,7 @@ class ProjectEndpointTest extends ApiEndpointTestAbstract
$this->assertFalse($project->is_archived);
}
public function test_update_endpoint_can_update_projects_billable_rate(): void
public function test_update_endpoint_does_not_update_billable_rates_of_time_entries_if_billable_rate_is_unchanged(): void
{
// Arrange
$data = $this->createUserWithPermission([
@@ -523,7 +523,7 @@ class ProjectEndpointTest extends ApiEndpointTestAbstract
'name' => $projectFake->name,
'color' => $projectFake->color,
'is_billable' => $projectFake->is_billable,
'billable_rate' => 10002,
'billable_rate' => $project->billable_rate,
]);
// Assert
@@ -531,7 +531,7 @@ class ProjectEndpointTest extends ApiEndpointTestAbstract
$this->assertDatabaseHas(Project::class, [
'name' => $projectFake->name,
'color' => $projectFake->color,
'billable_rate' => 10002,
'billable_rate' => $project->billable_rate,
]);
}
@@ -556,7 +556,6 @@ class ProjectEndpointTest extends ApiEndpointTestAbstract
'color' => $projectFake->color,
'is_billable' => $projectFake->is_billable,
'billable_rate' => 10003,
'billable_rate_update_time_entries' => true,
]);
// Assert