Write tests - Write tests for what was done to this point that will be kept #11

Merged
okorpheus merged 61 commits from write-tests into master 2024-07-05 21:21:32 +00:00
1 changed files with 14 additions and 0 deletions
Showing only changes of commit c3d7a7293b - Show all commits

View File

@ -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);
});