From a2c1401c6e97e4e31d98d880cbce97472b7adfd8 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Fri, 1 Nov 2024 20:58:38 +0100 Subject: [PATCH] Fixed test --- tests/Api/ScreensTest.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/Api/ScreensTest.php b/tests/Api/ScreensTest.php index 65d5271b..08bc0d75 100644 --- a/tests/Api/ScreensTest.php +++ b/tests/Api/ScreensTest.php @@ -192,7 +192,7 @@ public function testUpdateScreen(): void $regionUlid = $this->iriHelperUtils->getUlidFromIRI($regionIri); $client = $this->getAuthenticatedClient('ROLE_ADMIN'); - $iri = $this->findIriBy(Screen::class, ['title' => 'screen_abc_1']); + $iri = $this->findIriBy(Screen::class, ['title' => 'screen_abc_3']); $response = $client->request('PUT', $iri, [ 'json' => [ @@ -213,6 +213,23 @@ public function testUpdateScreen(): void ]); $playlistScreenRegionCountAfter = $playlistScreenRegionRepository->count([]); $this->assertEquals($playlistScreenRegionCountBefore, $playlistScreenRegionCountAfter, 'PlaylistScreenRegion count should not change'); + + $response = $client->request('PUT', $iri, [ + 'json' => [ + 'title' => 'Updated title 2', + ], + 'headers' => [ + 'Content-Type' => 'application/ld+json', + ], + ]); + + $this->assertResponseIsSuccessful(); + $this->assertJsonContains([ + '@id' => $iri, + 'title' => 'Updated title 2', + ]); + $playlistScreenRegionCountAfter = $playlistScreenRegionRepository->count([]); + $this->assertEquals($playlistScreenRegionCountBefore, $playlistScreenRegionCountAfter, 'PlaylistScreenRegion count should not change'); } public function testDeleteScreen(): void