<?php

namespace Tests\Unit\Services\Settings\SchoolCalendar;

use App\Services\Settings\SchoolCalendar\SchoolCalendarFormatterService;
use Tests\TestCase;

class SchoolCalendarFormatterServiceTest extends TestCase
{
    public function test_format_event_sets_background_for_no_school(): void
    {
        $service = new SchoolCalendarFormatterService();
        $formatted = $service->formatEvent([
            'id' => 1,
            'title' => 'No School Day',
            'date' => '2026-01-01',
            'no_school' => 1,
            'notify_parent' => 0,
            'notify_teacher' => 0,
            'notify_admin' => 0,
        ], 'parent');

        $this->assertSame('#ffc107', $formatted['extendedProps']['backgroundColor']);
        $this->assertSame('No School Day', $formatted['title']);
    }
}
