A free open source IT asset/license management system
Fixed test (was wrongly still associating fieldset on encrypted fields)
snipeb579b89afa8e
diff --git a/tests/Feature/Reporting/Custom/CustomAssetReportTest.php b/tests/Feature/Reporting/Custom/CustomAssetReportTest.phpindex 67516eed9e..f12829ab0d 100644--- a/tests/Feature/Reporting/Custom/CustomAssetReportTest.php+++ b/tests/Feature/Reporting/Custom/CustomAssetReportTest.php@@ -223,7 +223,11 @@ class CustomAssetReportTest extends TestCase$customField = CustomField::factory()->encrypt()->create();$columnName = $customField->db_column_name();- $asset = Asset::factory()->create(['name' => 'Encrypted Asset']);+ $fieldset = CustomFieldset::factory()->create();+ $fieldset->fields()->attach($customField, ['order' => 1, 'required' => false]);+ $model = AssetModel::factory()->create(['fieldset_id' => $fieldset->id]);++ $asset = Asset::factory()->for($model, 'model')->create(['name' => 'Encrypted Asset']);$asset->{$columnName} = Crypt::encrypt('super-secret-value');$asset->save();