From 07cb065e1cd052f4bfca8f2add4ef0297d4668b0 Mon Sep 17 00:00:00 2001 From: aslan Date: Mon, 12 Feb 2024 11:05:45 +0300 Subject: [PATCH] add FOREIGN KEY direction and department --- tests/Feature/admin/catalog/DepartmentTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Feature/admin/catalog/DepartmentTest.php b/tests/Feature/admin/catalog/DepartmentTest.php index 54fcfa0..c194a04 100644 --- a/tests/Feature/admin/catalog/DepartmentTest.php +++ b/tests/Feature/admin/catalog/DepartmentTest.php @@ -3,6 +3,7 @@ namespace Tests\Feature\admin\catalog; use App\Models\Department; +use App\Models\Direction; use App\Models\EducationalInstitution; use App\Models\Faculty; use App\Models\User; @@ -28,6 +29,8 @@ class DepartmentTest extends TestCase 'faculty_id', ]); + $this->direction = Direction::factory()->create(); + $this->user = User::factory()->create([ 'name' => 'admin', 'email' => 'test@example.com', @@ -95,6 +98,7 @@ class DepartmentTest extends TestCase public function testDestroyDepartment(): void { + $this->direction->delete(); $response = $this->actingAs($this->user) ->withSession(['banned' => false]) ->delete(route('departments.destroy', $this->department));