mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
chore: stricter pint rules
This commit is contained in:
parent
16b2e8436e
commit
e535496a1e
30 changed files with 134 additions and 83 deletions
|
|
@ -13,7 +13,7 @@ test('it keeps only the 50 most recent logs per device', function () {
|
|||
$device2 = Device::factory()->create();
|
||||
|
||||
// Create 60 logs for each device with different timestamps
|
||||
for ($i = 0; $i < 60; $i++) {
|
||||
for ($i = 0; $i < 60; ++$i) {
|
||||
DeviceLog::factory()->create([
|
||||
'device_id' => $device1->id,
|
||||
'device_timestamp' => now()->subMinutes($i),
|
||||
|
|
@ -37,7 +37,7 @@ test('it keeps only the 50 most recent logs per device', function () {
|
|||
$device2Logs = $device2->logs()->orderByDesc('device_timestamp')->get();
|
||||
|
||||
// Check that the timestamps are in descending order
|
||||
for ($i = 0; $i < 49; $i++) {
|
||||
for ($i = 0; $i < 49; ++$i) {
|
||||
expect($device1Logs[$i]->device_timestamp->gt($device1Logs[$i + 1]->device_timestamp))->toBeTrue()
|
||||
->and($device2Logs[$i]->device_timestamp->gt($device2Logs[$i + 1]->device_timestamp))->toBeTrue();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue