Write tests - Write tests for what was done to this point that will be kept #11
|
|
@ -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