Made test coverage for PageBuilder controllers and models
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use Tests\TestCase;
|
||||
use App\Models\PageRevision;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class PageRevisionTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_page_revision_creation() {
|
||||
$revision = PageRevision::factory()->create();
|
||||
$this->assertDatabaseHas('page_revisions', ['id' => $revision->id]);
|
||||
}
|
||||
|
||||
public function test_revision_has_uuid_and_version() {
|
||||
$revision = PageRevision::factory()->create();
|
||||
$this->assertNotNull($revision->uuid);
|
||||
$this->assertGreaterThan(0, $revision->version);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user