Skip to content

A free open source IT asset/license management system

Add additional case

Marcus Moore2f72c6661467
diff --git a/tests/Feature/Assets/Api/StoreAssetTest.php b/tests/Feature/Assets/Api/StoreAssetTest.php
index 8d648b835d..118ccee406 100644
--- a/tests/Feature/Assets/Api/StoreAssetTest.php
+++ b/tests/Feature/Assets/Api/StoreAssetTest.php
@@ -56,6 +56,21 @@ class StoreAssetTest extends TestCase
];
}
];
+
+ yield 'Super-User assigning across companies' => [
+ function () {
+ $superUser = User::factory()->superuser()->create();
+ $company = Company::factory()->create();
+
+ return [
+ 'actor' => $superUser,
+ 'company_attempting_to_associate' => $company,
+ 'assertions' => function ($asset) use ($company) {
+ self::assertEquals($asset->company_id, $company->id);
+ },
+ ];
+ }
+ ];
}
/**