From 3c1c6ea383cbab50daa26bb9fab262a11be23662 Mon Sep 17 00:00:00 2001 From: abourtnik Date: Thu, 7 Dec 2023 23:57:43 +0100 Subject: [PATCH] fix: CI --- .github/workflows/ci.yml | 6 +----- app/Http/Controllers/User/VideoController.php | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4387ef1..9c97698 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,12 +26,8 @@ jobs: run: php artisan key:generate - name: Directory Permissions run: chmod -R 777 storage bootstrap/cache - - name: Create Database - run: | - mkdir -p database - touch database/database.sqlite - name: Execute tests (Unit and Feature tests) via PHPUnit env: DB_CONNECTION: sqlite - DB_DATABASE: database/database.sqlite + DB_DATABASE: ':memory:' run: vendor/bin/phpunit diff --git a/app/Http/Controllers/User/VideoController.php b/app/Http/Controllers/User/VideoController.php index 9bad913..7cf71bd 100644 --- a/app/Http/Controllers/User/VideoController.php +++ b/app/Http/Controllers/User/VideoController.php @@ -141,7 +141,7 @@ public function update(UpdateVideoRequest $request, Video $video): RedirectRespo default => null, }, 'publication_date' => $video->publication_date?->isPast() ? $video->publication_date : match((int) $request->get('status')) { - VideoStatus::PUBLIC->value => null, + VideoStatus::PUBLIC->value => now(), VideoStatus::PLANNED->value => $request->get('scheduled_date'), default => null, }