mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-15 18:14:09 -08:00
23 lines
471 B
PHP
23 lines
471 B
PHP
<?php
|
|
namespace Tests\Unit\Models\Company;
|
|
|
|
use App\Models\Company;
|
|
use App\Models\User;
|
|
use Tests\TestCase;
|
|
|
|
class CompanyTest extends TestCase
|
|
{
|
|
public function testACompanyCanHaveUsers()
|
|
{
|
|
$company = Company::factory()->create();
|
|
$user = User::factory()
|
|
->create(
|
|
[
|
|
'company_id'=> $company->id
|
|
]
|
|
);
|
|
|
|
$this->assertCount(1, $company->users);
|
|
}
|
|
}
|