write new tests

This commit is contained in:
2025-05-12 17:05:42 +03:30
parent 70f3c36f58
commit db8cda55df
13 changed files with 507 additions and 18 deletions

View File

@@ -7,6 +7,7 @@ use App\Models\Call;
use App\Models\Category;
use App\Models\Permission;
use App\Models\User;
use Database\Seeders\EventSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
@@ -220,8 +221,11 @@ class UpdateTest extends TestCase
'telephone_id' => $telephoneId,
]);
$this->seed(EventSeeder::class);
$category = Category::factory()->create();
$description = $this->faker->sentence;
$response = $this->actingAs($user)->postJson(route('calls.update', $call->id), [
'category_id' => $category->category_id,
'subcategory_id' => $category->subcategory_id,