adrema/tests/Feature/Pdf/EfzTest.php

24 lines
621 B
PHP
Raw Normal View History

2022-03-20 16:33:56 +01:00
<?php
namespace Tests\Feature\Pdf;
use App\Member\Member;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;
class EfzTest extends TestCase
{
use DatabaseTransactions;
public function testItCreatesAEfzPdfFile(): void
{
$this->withoutExceptionHandling()->login();
$member = Member::factory()->defaults()->create(['firstname' => 'Max', 'lastname' => 'Muster']);
$response = $this->get("/member/{$member->id}/efz");
$response->assertOk();
$response->assertHeader('Content-Disposition', 'inline; filename="efz-fuer-max-muster.pdf"');
}
}