17 lines
444 B
PHP
17 lines
444 B
PHP
<?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);
|
|
});
|