Task 2 - no relationship

This commit is contained in:
PovilasKorop
2021-11-22 07:26:10 +02:00
parent 2d87c1255c
commit 9c71409ffc
7 changed files with 36 additions and 84 deletions
+10
View File
@@ -2,6 +2,7 @@
namespace Tests\Feature;
use App\Models\Task;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
@@ -19,4 +20,13 @@ class RelationshipsTest extends TestCase
]);
$response->assertStatus(200);
}
// TASK: this table throws an error, fix it
public function test_task_with_no_user()
{
Task::create(['name' => 'Some task']);
$response = $this->get('/tasks');
$response->assertStatus(200);
}
}