<?php

use Illuminate\Support\Facades\Schema;

test('pdf download returns a file response', function () {
    if (!Schema::hasTable('tamu')) {
        $this->markTestSkipped('Tamu table is not available in this test environment.');
    }

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

    $response->assertStatus(200);
    $response->assertHeader('content-disposition');
});

test('excel download returns a file response', function () {
    if (!Schema::hasTable('tamu')) {
        $this->markTestSkipped('Tamu table is not available in this test environment.');
    }

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

    $response->assertStatus(200);
    $response->assertHeader('content-disposition');
});
