Skip to content

Commit

Permalink
Fix fake images in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rastislav-chynoransky committed Jul 9, 2024
1 parent ff641d7 commit 838be17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion database/factories/PhotoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function withMedia(): Factory
{
return $this->afterCreating(function (Photo $photo) {
$photo
->addMediaFromUrl($this->faker->imageUrl())
->addMediaFromBase64(
'R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==',
)
->toMediaCollection('photos');
});
}
Expand Down
6 changes: 2 additions & 4 deletions tests/Feature/SitemapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ public function test_sitemap_lists_static_pages()
->assertSee(route('artworks.index'));
}

public function tests_litsts_presentable_artworks()
public function test_sitemap_lists_presentable_artworks()
{
$privateArtwork = Artwork::factory()->create();
$presentableArtwork = Artwork::factory()
->presentable()
->create();
$presentableArtwork = Artwork::factory()->presentable()->create();

$this->get('/sitemap.xml')
->assertSee(route('artworks.show', $presentableArtwork))
Expand Down

0 comments on commit 838be17

Please sign in to comment.