<?php

namespace Tests\Unit\Services\Administrator;

use App\Services\Administrator\TeacherSubmissionNotificationService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Http\Request;
use Mockery;
use Tests\TestCase;

class TeacherSubmissionNotificationServiceTest extends TestCase
{
    use RefreshDatabase;

    public function test_send_requires_targets(): void
    {
        $shared = Mockery::mock(\App\Services\Administrator\AdministratorSharedService::class);
        $support = Mockery::mock(\App\Services\Administrator\TeacherSubmissionSupportService::class);

        $service = new TeacherSubmissionNotificationService($shared, $support);
        $request = Request::create('/notify', 'POST', []);

        $result = $service->send($request, 1);

        $this->assertFalse($result['success']);
        $this->assertSame(422, $result['status']);
    }
}
