feat(food): add endpoint to update historical stock and separate current and historical food variants

This commit is contained in:
2026-09-15 15:03:41 -03:00
parent 9fa4da7de2
commit ff43ba32f3
9 changed files with 426 additions and 27 deletions

View File

@@ -65,6 +65,24 @@ class EventModelsTest extends TestCase
}
}
public function test_an_overnight_event_finishes_on_the_following_day(): void
{
Carbon::setTestNow('2026-10-10 01:00:00');
try {
$eventDate = new EventDate([
'date' => '2026-10-09',
'time_start' => '20:00:00',
'time_end' => '02:00:00',
]);
$this->assertSame('2026-10-10 02:00:00', $eventDate->endsAt()->format('Y-m-d H:i:s'));
$this->assertSame(EventDateStatus::InProgress, $eventDate->status);
} finally {
Carbon::setTestNow();
}
}
public function test_tenant_has_many_event_dates(): void
{
$tenant = new Tenant;