You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

21 lines
567 B

<?php
namespace Tests\Unit\Models;
use App\Entities\Partners\Customer;
use App\Entities\Partners\Vendor;
use App\Entities\Payments\Payment;
use Tests\TestCase;
class PaymentTest extends TestCase
{
/** @test */
public function it_has_partner_relation()
{
$payment = factory(Payment::class, 'income')->create(['in_out' => 1]);
$this->assertTrue($payment->partner instanceof Customer);
$payment = factory(Payment::class, 'expanse')->create(['in_out' => 0]);
$this->assertTrue($payment->partner instanceof Vendor);
}
}