test set layout browsing

This commit is contained in:
Yisroel Baum 2026-08-08 23:30:11 +03:00
parent 936855efab
commit eb7ac7d261
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
8 changed files with 619 additions and 3 deletions

View file

@ -66,6 +66,23 @@ class EloquentSetRepositoryTest extends TestCase
);
}
public function test_it_finds_a_set_by_id(): void
{
$creator = $this->createUser('creator@example.com');
$repository = app(SetRepository::class);
$createdSet = $repository->create(new CreateSetDto(
name: 'Bible',
creator: $creator,
));
$foundSet = $repository->find($createdSet->getId());
$this->assertNotNull($foundSet);
$this->assertSame($createdSet->getId(), $foundSet->getId());
$this->assertSame('Bible', $foundSet->getName());
$this->assertNull($repository->find(999));
}
public function test_it_rejects_duplicate_set_names(): void
{
$creator = $this->createUser('creator@example.com');