diff --git a/tests/Feature/Importing/Api/ImportAssetModelsTest.php b/tests/Feature/Importing/Api/ImportAssetModelsTest.php index b4bfe4fbaf..238fa231b2 100644 --- a/tests/Feature/Importing/Api/ImportAssetModelsTest.php +++ b/tests/Feature/Importing/Api/ImportAssetModelsTest.php @@ -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()]); diff --git a/tests/Support/Importing/AssetModelsImportFileBuilder.php b/tests/Support/Importing/AssetModelsImportFileBuilder.php index 95113ce88e..d2aba6a95b 100644 --- a/tests/Support/Importing/AssetModelsImportFileBuilder.php +++ b/tests/Support/Importing/AssetModelsImportFileBuilder.php @@ -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', ]; } }