Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
daVitekPL committed Mar 27, 2024
1 parent 877e09a commit 17dc74c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Api/LibraryApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ public function testGetLibrariesAdmin(): void

public function testGetLibraryById(): void
{
$this->authenticateAsAdmin();
$libraryName = 'DragTheWord';

$lib1 = H5PLibrary::factory()->create(['name' => $libraryName, 'patch_version' => 1]);
Expand All @@ -252,6 +253,7 @@ public function testGetLibraryById(): void
H5PContent::factory()->count(5)->create(['library_id' => $lib2->getKey()]);

$this
->actingAs($this->user, 'api')
->json('GET', 'api/hh5p/libraries', ['machnieName' => $libraryName, 'majorVersion' => 1, 'minorVersion' => 1])
->assertOk()
->assertJsonFragment([
Expand All @@ -260,6 +262,7 @@ public function testGetLibraryById(): void
]);

$this
->actingAs($this->user, 'api')
->json('GET', 'api/hh5p/libraries', ['library_id' => $lib1->getKey()])
->assertOk()
->assertJsonFragment([
Expand Down

0 comments on commit 17dc74c

Please sign in to comment.