<?php

namespace Tests\Feature;

use App\Models\Team;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class TeamSlugTest extends TestCase
{
    use RefreshDatabase;

    public function test_team_slug_is_generated_from_name_when_missing(): void
    {
        $team = Team::create([
            'name' => 'South Korea',
            'short_name' => 'Korea',
            'fifa_code' => 'KOR',
            'is_active' => true,
        ]);

        $this->assertSame('south-korea', $team->slug);
    }
}
