Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Oct 23, 2024
1 parent a16b433 commit d8fc4b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/Feature_v2/Statistics/AlbumSpaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ public function testAlbumSpaceTestAuthorized(): void

$response = $this->withoutMiddleware(VerifySupporterStatus::class)->actingAs($this->userMayUpload1)->getJson('Statistics::albumSpace?album_id=' . $this->album1->id);
$this->assertOk($response);
$this->assertCount(1, $response->json());
$this->assertCount(2, $response->json());
$this->assertEquals($this->album1->title, $response->json()[0]['title']);
$this->assertEquals($this->subAlbum1->title, $response->json()[1]['title']);

$response = $this->withoutMiddleware(VerifySupporterStatus::class)->actingAs($this->userMayUpload1)->getJson('Statistics::albumSpace?album_id=' . $this->subAlbum1->id);
$this->assertOk($response);
$this->assertCount(1, $response->json());
$this->assertEquals($this->subAlbum1->title, $response->json()[0]['title']);

$response = $this->withoutMiddleware(VerifySupporterStatus::class)->actingAs($this->admin)->getJson('Statistics::albumSpace');
$this->assertOk($response);
Expand Down

0 comments on commit d8fc4b5

Please sign in to comment.