mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
This commit is contained in:
parent
c67a182cf2
commit
b4b6286172
89 changed files with 672 additions and 666 deletions
|
|
@ -7,13 +7,13 @@ use Illuminate\Support\Facades\Storage;
|
|||
|
||||
uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
|
||||
|
||||
beforeEach(function () {
|
||||
beforeEach(function (): void {
|
||||
TrmnlPipeline::fake();
|
||||
Storage::fake('public');
|
||||
Storage::disk('public')->makeDirectory('/images/generated');
|
||||
});
|
||||
|
||||
test('it generates screen images and updates device', function () {
|
||||
test('it generates screen images and updates device', function (): void {
|
||||
$device = Device::factory()->create();
|
||||
$job = new GenerateScreenJob($device->id, null, view('trmnl')->render());
|
||||
$job->handle();
|
||||
|
|
@ -27,7 +27,7 @@ test('it generates screen images and updates device', function () {
|
|||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.png");
|
||||
});
|
||||
|
||||
test('it cleans up unused images', function () {
|
||||
test('it cleans up unused images', function (): void {
|
||||
// Create some test devices with images
|
||||
$activeDevice = Device::factory()->create([
|
||||
'current_screen_image' => 'uuid-to-be-replaced',
|
||||
|
|
@ -49,7 +49,7 @@ test('it cleans up unused images', function () {
|
|||
Storage::disk('public')->assertMissing('/images/generated/inactive-uuid.bmp');
|
||||
});
|
||||
|
||||
test('it preserves gitignore file during cleanup', function () {
|
||||
test('it preserves gitignore file during cleanup', function (): void {
|
||||
Storage::disk('public')->put('/images/generated/.gitignore', '*');
|
||||
|
||||
$device = Device::factory()->create();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue