test overdue dashboard assignments
This commit is contained in:
parent
2c38b01562
commit
7bc7ad207b
3 changed files with 42 additions and 26 deletions
|
|
@ -225,7 +225,7 @@ class ScheduleEndpointTest extends TestCase
|
|||
]);
|
||||
}
|
||||
|
||||
public function test_it_lists_the_users_assignments_for_a_date(): void
|
||||
public function test_it_lists_the_users_assignments_due_through_a_date(): void
|
||||
{
|
||||
$user = $this->createUser('reader@example.com');
|
||||
$otherUser = $this->createUser('other@example.com');
|
||||
|
|
@ -255,8 +255,8 @@ class ScheduleEndpointTest extends TestCase
|
|||
$this->credentialedPost('/api/schedules', [
|
||||
'setId' => $olderSet->getId(),
|
||||
'levelId' => $olderLevel->getId(),
|
||||
'startDate' => '2026-08-15',
|
||||
'targetDate' => '2026-08-15',
|
||||
'startDate' => '2026-08-14',
|
||||
'targetDate' => '2026-08-14',
|
||||
])->assertCreated();
|
||||
$this->credentialedPost('/api/schedules', [
|
||||
'setId' => $newerSet->getId(),
|
||||
|
|
@ -286,22 +286,9 @@ class ScheduleEndpointTest extends TestCase
|
|||
->assertExactJson([
|
||||
'date' => '2026-08-15',
|
||||
'assignments' => [
|
||||
[
|
||||
'id' => 3,
|
||||
'schedule' => [
|
||||
'id' => 2,
|
||||
'set' => [
|
||||
'name' => 'Newer course',
|
||||
],
|
||||
],
|
||||
'element' => [
|
||||
'name' => 'Only chapter',
|
||||
'kind' => 'chapter',
|
||||
'path' => ['Only chapter'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'id' => 1,
|
||||
'scheduledDate' => '2026-08-14',
|
||||
'schedule' => [
|
||||
'id' => 1,
|
||||
'set' => [
|
||||
|
|
@ -316,6 +303,7 @@ class ScheduleEndpointTest extends TestCase
|
|||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'scheduledDate' => '2026-08-14',
|
||||
'schedule' => [
|
||||
'id' => 1,
|
||||
'set' => [
|
||||
|
|
@ -328,6 +316,21 @@ class ScheduleEndpointTest extends TestCase
|
|||
'path' => ['Second lesson'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'id' => 3,
|
||||
'scheduledDate' => '2026-08-15',
|
||||
'schedule' => [
|
||||
'id' => 2,
|
||||
'set' => [
|
||||
'name' => 'Newer course',
|
||||
],
|
||||
],
|
||||
'element' => [
|
||||
'name' => 'Only chapter',
|
||||
'kind' => 'chapter',
|
||||
'path' => ['Only chapter'],
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue