mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
This commit is contained in:
parent
c67a182cf2
commit
b4b6286172
89 changed files with 672 additions and 666 deletions
|
|
@ -4,7 +4,7 @@ use App\Models\Device;
|
|||
use App\Models\Playlist;
|
||||
use App\Models\PlaylistItem;
|
||||
|
||||
test('playlist has required attributes', function () {
|
||||
test('playlist has required attributes', function (): void {
|
||||
$playlist = Playlist::factory()->create([
|
||||
'name' => 'Test Playlist',
|
||||
'is_active' => true,
|
||||
|
|
@ -21,7 +21,7 @@ test('playlist has required attributes', function () {
|
|||
->active_until->format('H:i')->toBe('17:00');
|
||||
});
|
||||
|
||||
test('playlist belongs to device', function () {
|
||||
test('playlist belongs to device', function (): void {
|
||||
$device = Device::factory()->create();
|
||||
$playlist = Playlist::factory()->create(['device_id' => $device->id]);
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ test('playlist belongs to device', function () {
|
|||
->id->toBe($device->id);
|
||||
});
|
||||
|
||||
test('playlist has many items', function () {
|
||||
test('playlist has many items', function (): void {
|
||||
$playlist = Playlist::factory()->create();
|
||||
$items = PlaylistItem::factory()->count(3)->create(['playlist_id' => $playlist->id]);
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ test('playlist has many items', function () {
|
|||
->each->toBeInstanceOf(PlaylistItem::class);
|
||||
});
|
||||
|
||||
test('getNextPlaylistItem returns null when playlist is inactive', function () {
|
||||
test('getNextPlaylistItem returns null when playlist is inactive', function (): void {
|
||||
$playlist = Playlist::factory()->create(['is_active' => false]);
|
||||
|
||||
expect($playlist->getNextPlaylistItem())->toBeNull();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue