user affiliation schema completed
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Tests\Feature\Models;
|
||||
use App\Models\Institution;
|
||||
use App\Models\InstitutionLink;
|
||||
use App\Models\Lists\InstitutionCategory;
|
||||
use App\Models\UserAffiliation;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Str;
|
||||
use Tests\TestCase;
|
||||
@@ -86,6 +87,14 @@ class InstitutionTest extends TestCase
|
||||
$this->assertCount(1, $institution->refresh()->links);
|
||||
}
|
||||
|
||||
public function test_it_has_many_affiliations(): void
|
||||
{
|
||||
$institution = Institution::factory()->create();
|
||||
UserAffiliation::factory()->create(['institution_id' => $institution->id]);
|
||||
|
||||
$this->assertCount(1, $institution->refresh()->affiliations);
|
||||
}
|
||||
|
||||
public function test_it_is_soft_deleted(): void
|
||||
{
|
||||
$institution = Institution::factory()->create();
|
||||
|
||||
Reference in New Issue
Block a user