Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
tuj committed Nov 1, 2024
1 parent 7c36959 commit a2c1401
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/Api/ScreensTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand All @@ -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
Expand Down

0 comments on commit a2c1401

Please sign in to comment.