mirror of
https://github.com/10h30/Test-Eloquent-Relationships.git
synced 2026-06-05 15:07:42 +09:00
Task 2 - no relationship
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user