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 16 additions and 0 deletions
Showing only changes of commit f95b89c7ac - Show all commits

View File

@ -0,0 +1,16 @@
<?php
use App\Models\Entry;
use App\Models\EntryFlag;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
it('has an entry', function () {
$entry = Entry::factory()->create();
$entryFlag = EntryFlag::create(['entry_id' => $entry->id, 'flag_name' => 'declined']);
// Act & Assert
expect($entryFlag->entry->id)->toBe($entry->id)
->and($entryFlag->entry)->toBeInstanceOf(Entry::class);
});