<?php

use App\Models\MediaTaskAssignment;
use App\Models\Report;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

test('report relates to media task assignment', function () {
    $mta = MediaTaskAssignment::factory()->create();
    $report = Report::factory()->create(['media_task_assignment_id' => $mta->id]);

    expect($report->mediaTaskAssignment->id)->toBe($mta->id);
    expect($mta->reports)->toHaveCount(1);
});
