mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Fixed data type of project and task spend time
This commit is contained in:
@@ -185,4 +185,19 @@ class ProjectModelTest extends ModelTestAbstract
|
||||
// Assert
|
||||
$this->assertFalse($isArchived);
|
||||
}
|
||||
|
||||
public function test_project_can_store_big_amounts_of_spent_time(): void
|
||||
{
|
||||
// Arrange
|
||||
$project = Project::factory()->create();
|
||||
$spentTime = 100 * 365 * 24 * 60 * 60; // 100 years in seconds
|
||||
|
||||
// Act
|
||||
$project->spent_time = $spentTime;
|
||||
$project->save();
|
||||
$project->refresh();
|
||||
|
||||
// Assert
|
||||
$this->assertSame($spentTime, $project->spent_time);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,4 +114,19 @@ class TaskModelTest extends ModelTestAbstract
|
||||
// Assert
|
||||
$this->assertFalse($task->is_done);
|
||||
}
|
||||
|
||||
public function test_task_can_store_big_amounts_of_spent_time(): void
|
||||
{
|
||||
// Arrange
|
||||
$task = Task::factory()->create();
|
||||
$spentTime = 100 * 365 * 24 * 60 * 60; // 100 years in seconds
|
||||
|
||||
// Act
|
||||
$task->spent_time = $spentTime;
|
||||
$task->save();
|
||||
$task->refresh();
|
||||
|
||||
// Assert
|
||||
$this->assertSame($spentTime, $task->spent_time);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user