Create EntryFlagTest.php
This commit is contained in:
parent
07ff78f9a9
commit
f95b89c7ac
|
|
@ -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);
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue