adrema/tests/Feature/Member/DavTest.php

39 lines
999 B
PHP

<?php
namespace Tests\Feature\Member;
use App\Member\Member;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;
class DavTest extends TestCase
{
use DatabaseTransactions;
public function testItDisplaysCalendar(): void
{
$this->createDavUser()->withoutExceptionHandling();
$this->getDavCalendars()->assertSee('Geburtstage');
}
public function testItDisplaysBirthdaysOfMembers(): void
{
$this->createDavUser()->withoutExceptionHandling();
$member = Member::factory()->defaults()->create();
$this->getDavCalendar('birthdays')->assertSee($member->slug . '.ics');
}
public function testItGetsObjectsWhenBirthdayIsNull(): void
{
$this->createDavUser()->withoutExceptionHandling();
$member = Member::factory()->defaults()->create(['birthday' => null]);
$this->getDavCalendar('birthdays')->assertStatus(207);
}
}