Create EntryFlagTest.php

This commit is contained in:
Matt Young 2024-07-01 10:11:34 -05:00
parent 07ff78f9a9
commit f95b89c7ac
1 changed files with 16 additions and 0 deletions

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