Finish re-working tests to run on test database
This commit is contained in:
parent
09fc211623
commit
1abca77bdc
50 changed files with 535 additions and 265 deletions
|
@ -5,16 +5,20 @@ declare(strict_types=1);
|
|||
namespace Tests\Unit;
|
||||
|
||||
use App\Models\Media;
|
||||
use App\Models\Note;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class MediaTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
/** @test */
|
||||
public function getTheNoteThatMediaInstanceBelongsTo(): void
|
||||
{
|
||||
$media = Media::find(1);
|
||||
$note = $media->note;
|
||||
$this->assertInstanceOf('App\Models\Note', $note);
|
||||
$media = Media::factory()->for(Note::factory())->create();
|
||||
|
||||
$this->assertInstanceOf(Note::class, $media->note);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue