15 lines
358 B
PHP
15 lines
358 B
PHP
<?php
|
|
|
|
use App\Models\School;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
it('has a school', function () {
|
|
$school = School::factory()->create();
|
|
$schoolEmailDomain = $school->emailDomains()->create([
|
|
'domain' => 'example.com',
|
|
]);
|
|
expect($schoolEmailDomain->school->id)->toBe($school->id);
|
|
});
|