<?php

use App\Models\Cooperation;
use App\Models\TaskAssignment;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

test('task assignment works', function () {
    $cooperation = Cooperation::factory()->create();
    $task = TaskAssignment::factory()->create(['cooperation_id' => $cooperation->id]);

    expect($task->cooperation->id)->toBe($cooperation->id);
    expect($cooperation->taskAssignment->id)->toBe($task->id);
});
