Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
daVitekPL committed Mar 27, 2024
1 parent 40e4c86 commit d1f86d0
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions tests/Api/ContentApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,17 @@ public function testContentUpdateNewLibraryVersion(): void
'library' => $newVersion->uberName,
'params' => '{"params":{"taskDescription":"Documentation tool","pagesList":[{"params":{"elementList":[{"params":{},"library":"H5P.Text 1.1","metadata":{"contentType":"Text","license":"U","title":"Untitled Text","authors":[],"changes":[],"extraTitle":"Untitled Text"},"subContentId":"da3387da-355a-49fb-92bc-3a9a4e4646a9"}],"helpTextLabel":"More information","helpText":""},"library":"H5P.StandardPage 1.5","metadata":{"contentType":"Standard page","license":"U","title":"Untitled Standard page","authors":[],"changes":[],"extraTitle":"Untitled Standard page"},"subContentId":"ac6ffdac-be02-448c-861c-969e6a09dbd5"}],"i10n":{"previousLabel":"poprzedni","nextLabel":"Next","closeLabel":"Close"}},"metadata":{"license":"U","authors":[],"changes":[],"extraTitle":"fdsfds","title":"fdsfds"}}',
])
->assertStatus(200)
->assertJsonFragment([
'id' => $library->getKey(),
'patchVersion' => $library->patchVersion,
])
->assertJsonMissing([
'id' => $newVersion->getKey(),
'patchVersion' => $newVersion->patchVersion,
]);
->assertStatus(200);

$this->assertDatabaseHas('hh5p_contents', [
'id' => $id,
'library_id' => $library->getKey(),
]);

$this->assertDatabaseMissing('hh5p_contents', [
'id' => $id,
'library_id' => $newVersion->getKey(),
]);
}

public function testContentUpdateAuthor(): void
Expand Down

0 comments on commit d1f86d0

Please sign in to comment.