Updated seeder

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-11-13 01:42:39 +00:00
parent 48713cbddf
commit 615edbbd43
2 changed files with 4 additions and 2 deletions

View file

@ -121,7 +121,9 @@ class ImportAssetModelsTest extends ImportDataTestCase implements TestsPermissio
public function updateAssetModelFromImport(): void
{
$assetmodel = AssetModel::factory()->create()->refresh();
$importFileBuilder = ImportFileBuilder::new(['name' => Str::random(), 'model_number' => Str::random()]);
$new_model_number = Str::random();
$importFileBuilder = ImportFileBuilder::new(['name' => $assetmodel->name, 'model_number' => Str::random(), 'category_id' => $assetmodel->category_id]);
$row = $importFileBuilder->firstRow();
$import = Import::factory()->assetmodel()->create(['file_path' => $importFileBuilder->saveToImportsDirectory()]);

View file

@ -52,7 +52,7 @@ class AssetModelsImportFileBuilder extends FileBuilder
'name' => $faker->catchPhrase,
'category' => Str::random(),
'model_number' => $faker->creditCardNumber(),
'notes' => $faker->sentence(5),
'notes' => 'Created by demo seeder',
];
}
}