<?php

use App\Models\CooperationMedia;
use App\Models\CooperationPayment;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

test('cooperation payment can be created', function () {
    $coopMedia = CooperationMedia::factory()->create();
    $payment = CooperationPayment::factory()->create([
        'cooperation_media_id' => $coopMedia->id,
        'amount' => 5000000,
    ]);

    expect($payment->amount)->toBe(5000000);
    expect($payment->cooperationMedia->id)->toBe($coopMedia->id);
});
