Create SchoolEmailDomainTest.php
This commit is contained in:
parent
34f5dd2952
commit
c3d7a7293b
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?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);
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue