<?php

use App\Models\Kunjungan;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

test('dashboard shows the bertemu dengan column with data from the database', function () {
    $kunjungan = Kunjungan::create([
        'nama' => 'Budi',
        'instansi' => 'SMKN 7',
        'tujuan' => 'Kunjungan',
        'bertemu_dengan' => 'Admin',
        'jam' => '10:00',
        'hari' => 'Senin',
        'tanggal' => now()->toDateString(),
    ]);

    $response = $this->withSession(['login' => true])->get('/dashboard');

    $response->assertStatus(200);
    $response->assertSee('Bertemu Dengan');
    $response->assertSee(e($kunjungan->bertemu_dengan));
});
