<?php

namespace Tests\Feature;

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

class LocalizationTest extends TestCase
{
    use RefreshDatabase;

    public function test_user_can_switch_to_indonesian_locale(): void
    {
        $user = User::factory()->create();

        $this->actingAs($user)
            ->withSession(['locale' => 'id'])
            ->get('/dashboard')
            ->assertOk()
            ->assertSee('Dasbor')
            ->assertSee('Total Inspeksi');
    }
}
