test empty schedule returns empty array
This commit is contained in:
parent
c0f35c88b7
commit
54e33f9b03
1 changed files with 17 additions and 0 deletions
|
|
@ -146,4 +146,21 @@ class GetTodaysScheduleTest extends TestCase
|
||||||
userId: 99,
|
userId: 99,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_returns_empty_array_when_user_has_no_scheduled_nodes(): void
|
||||||
|
{
|
||||||
|
$otherUser = $this->userRepo->create(new CreateUserDto(
|
||||||
|
email: new EmailAddress('other@email.com'),
|
||||||
|
passwordHash: 'hash',
|
||||||
|
isAdmin: false,
|
||||||
|
));
|
||||||
|
|
||||||
|
$result = $this->useCase->execute(new GetTodaysScheduleRequest(
|
||||||
|
date: '2025-01-02',
|
||||||
|
userId: $otherUser->getId(),
|
||||||
|
));
|
||||||
|
|
||||||
|
$this->assertIsArray($result);
|
||||||
|
$this->assertEquals(0, count($result));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue