Write tests - Write tests for what was done to this point that will be kept #11
|
|
@ -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