<?php

use App\Enums\DataChangeDecision;
use App\Models\DataChangeRequest;
use App\Models\DataChangeReview;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

test('data change review works', function () {
    $request = DataChangeRequest::factory()->create();
    $review = DataChangeReview::factory()->create([
        'data_change_request_id' => $request->id,
        'decision' => DataChangeDecision::APPROVED,
    ]);

    expect($request->review->id)->toBe($review->id);
    expect($review->request->id)->toBe($request->id);
});
