Use the Setting model for basetest

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-12-02 17:37:51 -08:00
parent 390e8a6cc3
commit 5a01fff79c

View file

@ -2,11 +2,13 @@
namespace Tests\Unit; namespace Tests\Unit;
use App\Models\User; use App\Models\User;
use App\Models\Setting;
use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\WithoutMiddleware; use Illuminate\Foundation\Testing\WithoutMiddleware;
use Tests\TestCase; use Tests\TestCase;
use Auth; use Auth;
use Artisan;
class BaseTest extends TestCase class BaseTest extends TestCase
{ {
@ -15,7 +17,7 @@ class BaseTest extends TestCase
protected function _before() protected function _before()
{ {
Artisan::call('migrate'); Artisan::call('migrate');
\App\Models\Setting::factory()->create(); Setting::factory()->create();
} }
protected function signIn($user = null) protected function signIn($user = null)