test set layout browsing
This commit is contained in:
parent
936855efab
commit
eb7ac7d261
8 changed files with 619 additions and 3 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue