<?php

use App\Models\Journalist;
use App\Models\PartnerMedia;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

test('partner media has journalists', function () {
    $media = PartnerMedia::factory()->create();
    Journalist::factory()->count(2)->create(['partner_media_id' => $media->id]);

    expect($media->journalists)->toHaveCount(2);
});
