10-04-2026
This commit is contained in:
parent
4d6b4930b2
commit
4bb89aad8c
836 changed files with 52961 additions and 5950 deletions
27
tests/Feature/ResetCabinetTabletOverridesTest.php
Normal file
27
tests/Feature/ResetCabinetTabletOverridesTest.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
use App\Models\CabinetTabletSetting;
|
||||
|
||||
test('cabinet:reset-overrides command clears override times', function () {
|
||||
CabinetTabletSetting::factory()->create([
|
||||
'override_open_today' => '09:00',
|
||||
'override_close_today' => '20:00',
|
||||
]);
|
||||
|
||||
$this->artisan('cabinet:reset-overrides')
|
||||
->assertSuccessful();
|
||||
|
||||
$settings = CabinetTabletSetting::current();
|
||||
expect($settings->override_open_today)->toBeNull();
|
||||
expect($settings->override_close_today)->toBeNull();
|
||||
});
|
||||
|
||||
test('cabinet:reset-overrides works when no overrides are set', function () {
|
||||
CabinetTabletSetting::factory()->create([
|
||||
'override_open_today' => null,
|
||||
'override_close_today' => null,
|
||||
]);
|
||||
|
||||
$this->artisan('cabinet:reset-overrides')
|
||||
->assertSuccessful();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue