A free open source IT asset/license management system
Add InteractsWithSettings trait to required tests
Marcus Mooreda08f6ef8cd3
diff --git a/tests/Unit/AssetMaintenanceTest.php b/tests/Unit/AssetMaintenanceTest.phpindex 31b68c0cf5..b5ee25cf2b 100644--- a/tests/Unit/AssetMaintenanceTest.php+++ b/tests/Unit/AssetMaintenanceTest.php@@ -3,10 +3,13 @@ namespace Tests\Unit;use App\Models\AssetMaintenance;use Carbon\Carbon;+use Tests\Support\InteractsWithSettings;use Tests\TestCase;class AssetMaintenanceTest extends TestCase{+ use InteractsWithSettings;+public function testZerosOutWarrantyIfBlank(){$c = new AssetMaintenance;diff --git a/tests/Unit/AssetModelTest.php b/tests/Unit/AssetModelTest.phpindex 7050ea307d..8771187b2a 100644--- a/tests/Unit/AssetModelTest.php+++ b/tests/Unit/AssetModelTest.php@@ -4,10 +4,13 @@ namespace Tests\Unit;use App\Models\Asset;use App\Models\Category;use App\Models\AssetModel;+use Tests\Support\InteractsWithSettings;use Tests\TestCase;class AssetModelTest extends TestCase{+ use InteractsWithSettings;+public function testAnAssetModelZerosOutBlankEols(){$am = new AssetModel;diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.phpindex e4dc8a803f..432165dc07 100644--- a/tests/Unit/AssetTest.php+++ b/tests/Unit/AssetTest.php@@ -5,10 +5,13 @@ use App\Models\Asset;use App\Models\AssetModel;use App\Models\Category;use Carbon\Carbon;+use Tests\Support\InteractsWithSettings;use Tests\TestCase;class AssetTest extends TestCase{+ use InteractsWithSettings;+// public function testAutoIncrementMixed()// {// $expected = '123411';diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.phpindex 387ed946e0..c74597b1b4 100644--- a/tests/Unit/CategoryTest.php+++ b/tests/Unit/CategoryTest.php@@ -4,10 +4,13 @@ namespace Tests\Unit;use App\Models\Category;use App\Models\AssetModel;use App\Models\Asset;+use Tests\Support\InteractsWithSettings;use Tests\TestCase;class CategoryTest extends TestCase{+ use InteractsWithSettings;+public function testFailsEmptyValidation(){// An Asset requires a name, a qty, and a category_id.diff --git a/tests/Unit/ComponentTest.php b/tests/Unit/ComponentTest.phpindex df8f64771f..8f71057bfc 100644--- a/tests/Unit/ComponentTest.php+++ b/tests/Unit/ComponentTest.php@@ -5,10 +5,13 @@ use App\Models\Category;use App\Models\Company;use App\Models\Component;use App\Models\Location;+use Tests\Support\InteractsWithSettings;use Tests\TestCase;class ComponentTest extends TestCase{+ use InteractsWithSettings;+public function testAComponentBelongsToACompany(){$component = Component::factory()diff --git a/tests/Unit/DepreciationTest.php b/tests/Unit/DepreciationTest.phpindex 4dd8422276..ed033cf442 100644--- a/tests/Unit/DepreciationTest.php+++ b/tests/Unit/DepreciationTest.php@@ -5,10 +5,13 @@ use App\Models\Depreciation;use App\Models\Category;use App\Models\License;use App\Models\AssetModel;+use Tests\Support\InteractsWithSettings;use Tests\TestCase;class DepreciationTest extends TestCase{+ use InteractsWithSettings;+public function testADepreciationHasModels(){$depreciation = Depreciation::factory()->create();diff --git a/tests/Unit/NotificationTest.php b/tests/Unit/NotificationTest.phpindex 8005759a1e..64cf8afb0a 100644--- a/tests/Unit/NotificationTest.php+++ b/tests/Unit/NotificationTest.php@@ -8,10 +8,13 @@ use App\Models\Category;use Carbon\Carbon;use App\Notifications\CheckoutAssetNotification;use Illuminate\Support\Facades\Notification;+use Tests\Support\InteractsWithSettings;use Tests\TestCase;class NotificationTest extends TestCase{+ use InteractsWithSettings;+public function testAUserIsEmailedIfTheyCheckoutAnAssetWithEULA(){$admin = User::factory()->superuser()->create();diff --git a/tests/Unit/SnipeModelTest.php b/tests/Unit/SnipeModelTest.phpindex 2bc81da61b..ad4231010f 100644--- a/tests/Unit/SnipeModelTest.php+++ b/tests/Unit/SnipeModelTest.php@@ -2,10 +2,13 @@namespace Tests\Unit;use App\Models\SnipeModel;+use Tests\Support\InteractsWithSettings;use Tests\TestCase;class SnipeModelTest extends TestCase{+ use InteractsWithSettings;+public function testSetsPurchaseDatesAppropriately(){$c = new SnipeModel;