Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlpp committed Oct 13, 2023
1 parent 00f65f5 commit 9158978
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/Http/Api/ApiFilesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
'path' => '/files/images/test.jpg',
'disk' => 's3',
'thumbnail' => sprintf(
'/storage/thumbnails/files/images/400-400/test.jpg?%s',
Storage::disk('public')->lastModified('/thumbnails/files/images/400-400/test.jpg')
'/storage/thumbnails/files/images/400-400_q-90/test.jpg?%s',
Storage::disk('public')->lastModified('/thumbnails/files/images/400-400_q-90/test.jpg')
),
'size' => 6467,
],
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/Form/Eloquent/Uploads/SharpUploadModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
$upload = createSharpUploadModel($file);

expect($upload->thumbnail(null, 150))
->toStartWith('/storage/thumbnails/data/-150/'.basename($file))
->and(Storage::disk('public')->exists('thumbnails/data/-150/'.basename($file)))
->toStartWith('/storage/thumbnails/data/-150_q-90/'.basename($file))
->and(Storage::disk('public')->exists('thumbnails/data/-150_q-90/'.basename($file)))
->toBeTrue();
})->group('eloquent');

Expand Down Expand Up @@ -66,7 +66,7 @@
$upload->filters = $filters;
$upload->save();

$folderPath = 'thumbnails/data/-150_'.md5(serialize($filters));
$folderPath = 'thumbnails/data/-150_'.md5(serialize($filters)).'_q-90';

expect($upload->thumbnail(null, 150))
->toStartWith("/storage/{$folderPath}/".basename($upload->file_name))
Expand Down

0 comments on commit 9158978

Please sign in to comment.