add tests batch 20
This commit is contained in:
@@ -18,7 +18,7 @@ class AuthorizedUsersControllerTest extends TestCase
|
||||
'user_id' => $parentId,
|
||||
'firstname' => 'Aunt',
|
||||
'lastname' => 'Carer',
|
||||
'email' => 'carer-'.uniqid().'@example.test',
|
||||
'email' => 'carer-' . uniqid() . '@example.test',
|
||||
'phone_number' => '5551112222',
|
||||
'relation_to_user' => 'Aunt',
|
||||
'status' => 'pending',
|
||||
@@ -74,7 +74,7 @@ class AuthorizedUsersControllerTest extends TestCase
|
||||
$foreign = $this->makeAuthorizedUser($otherParent->id);
|
||||
|
||||
$this->actingAs($parent, 'api')
|
||||
->getJson('/api/v1/parents/authorized-users/'.$foreign->id)
|
||||
->getJson('/api/v1/parents/authorized-users/' . $foreign->id)
|
||||
->assertNotFound();
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class AuthorizedUsersControllerTest extends TestCase
|
||||
$record = $this->makeAuthorizedUser($parent->id);
|
||||
|
||||
$this->actingAs($parent, 'api')
|
||||
->deleteJson('/api/v1/parents/authorized-users/'.$record->id)
|
||||
->deleteJson('/api/v1/parents/authorized-users/' . $record->id)
|
||||
->assertOk()
|
||||
->assertJsonPath('status', true);
|
||||
|
||||
@@ -98,7 +98,7 @@ class AuthorizedUsersControllerTest extends TestCase
|
||||
$foreign = $this->makeAuthorizedUser($otherParent->id);
|
||||
|
||||
$this->actingAs($parent, 'api')
|
||||
->deleteJson('/api/v1/parents/authorized-users/'.$foreign->id)
|
||||
->deleteJson('/api/v1/parents/authorized-users/' . $foreign->id)
|
||||
->assertNotFound();
|
||||
|
||||
$this->assertDatabaseHas('authorized_users', ['id' => $foreign->id]);
|
||||
|
||||
@@ -106,7 +106,7 @@ class ParentAttendanceReportControllerTest extends TestCase
|
||||
]);
|
||||
|
||||
Sanctum::actingAs($parent);
|
||||
$response = $this->patchJson('/api/v1/parents/attendance-reports/'.$reportId, [
|
||||
$response = $this->patchJson('/api/v1/parents/attendance-reports/' . $reportId, [
|
||||
'reason' => 'Family emergency',
|
||||
]);
|
||||
|
||||
@@ -193,7 +193,6 @@ class ParentAttendanceReportControllerTest extends TestCase
|
||||
if ((int) $dt->format('w') !== 0) {
|
||||
$dt->modify('next sunday');
|
||||
}
|
||||
|
||||
return $dt->format('Y-m-d');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user