add some test
This commit is contained in:
@@ -71,7 +71,7 @@ test('an user can retrieve a to do', function () {
|
||||
Sanctum::actingAs($this->user);
|
||||
$toDos = ToDo::factory()->count(10)->create([
|
||||
'user_id' => $this->user->id,
|
||||
'checked' => false,
|
||||
'checked' => null,
|
||||
]);
|
||||
|
||||
$toDo = $toDos[rand(0, 9)];
|
||||
@@ -91,7 +91,7 @@ test('an user can update a to do', function () {
|
||||
Sanctum::actingAs($this->user);
|
||||
$toDos = ToDo::factory()->count(10)->create([
|
||||
'user_id' => $this->user->id,
|
||||
'checked' => false,
|
||||
'checked' => null,
|
||||
]);
|
||||
|
||||
$toDo = $toDos[rand(0, 9)];
|
||||
@@ -103,7 +103,7 @@ test('an user can update a to do', function () {
|
||||
'id' => $toDo->id,
|
||||
'user_id' => $toDo->user_id,
|
||||
'name' => 'update test',
|
||||
'checked' => false,
|
||||
'checked' => null,
|
||||
]);
|
||||
|
||||
expect(ToDo::find($toDo->id))
|
||||
@@ -114,7 +114,7 @@ test('an user can delete a to do', function () {
|
||||
Sanctum::actingAs($this->user);
|
||||
$toDos = ToDo::factory()->count(10)->create([
|
||||
'user_id' => $this->user->id,
|
||||
'checked' => false,
|
||||
'checked' => null,
|
||||
]);
|
||||
|
||||
$toDo = $toDos[rand(0, 9)];
|
||||
|
||||
Reference in New Issue
Block a user