From c40ddf8375d9bef5e09111baeab7e356fa9dd38e Mon Sep 17 00:00:00 2001 From: Buster Neece Date: Sun, 29 Jan 2023 23:59:42 -0600 Subject: [PATCH] Update test suites. --- src/Sync/Task/UpdateMeilisearchIndex.php | 1 + tests/Functional/Api_RequestsCest.php | 47 ------------------------ 2 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 tests/Functional/Api_RequestsCest.php diff --git a/src/Sync/Task/UpdateMeilisearchIndex.php b/src/Sync/Task/UpdateMeilisearchIndex.php index fb0027a8e..df5fe5aeb 100644 --- a/src/Sync/Task/UpdateMeilisearchIndex.php +++ b/src/Sync/Task/UpdateMeilisearchIndex.php @@ -39,6 +39,7 @@ final class UpdateMeilisearchIndex extends AbstractTask { if (!$this->meilisearch->isSupported()) { $this->logger->debug('Meilisearch is not supported on this instance. Skipping sync task.'); + return; } $storageLocations = $this->iterateStorageLocations(Entity\Enums\StorageLocationTypes::StationMedia); diff --git a/tests/Functional/Api_RequestsCest.php b/tests/Functional/Api_RequestsCest.php deleted file mode 100644 index 53618c8bd..000000000 --- a/tests/Functional/Api_RequestsCest.php +++ /dev/null @@ -1,47 +0,0 @@ -wantTo('Check request API endpoints.'); - - // Enable requests on station. - $testStation = $this->getTestStation(); - $station_id = $testStation->getId(); - - $testStation->setEnableRequests(true); - $this->em->persist($testStation); - $this->em->flush(); - - // Upload a test song. - $media = $this->uploadTestSong(); - - $playlist = new Entity\StationPlaylist($testStation); - $playlist->setName('Test Playlist'); - $this->em->persist($playlist); - - $spm = new Entity\StationPlaylistMedia($playlist, $media); - $this->em->persist($spm); - - $this->em->flush(); - $this->em->clear(); - - $I->sendGET('/api/station/' . $station_id . '/requests'); - - $I->seeResponseIsJson(); - $I->seeResponseCodeIs(200); - - $I->sendGET('/api/station/' . $station_id . '/request/' . $media->getUniqueId()); - - $I->seeResponseIsJson(); - $I->seeResponseCodeIs(200); - } -}