Small fixes

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2021-12-01 23:33:20 -08:00
parent ad6d70b86f
commit ed2797afdd
4 changed files with 8 additions and 25 deletions
+2 -2
View File
@@ -6,6 +6,7 @@ use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Tests\TestCase;
use Auth;
class BaseTest extends TestCase
{
@@ -25,13 +26,12 @@ class BaseTest extends TestCase
]);
}
Auth::login($user);
return $user;
}
protected function createValidAssetModel($state = 'mbp-13-model', $overrides = [])
{
return \App\Models\AssetModel::factory()->state()->create(array_merge([
return \App\Models\AssetModel::factory()->state($state)->create(array_merge([
'category_id' => $this->createValidCategory(),
'manufacturer_id' => $this->createValidManufacturer(),
'depreciation_id' => $this->createValidDepreciation(),