A free open source IT asset/license management system
Unit test fix. Cleaner this way.
Daniel Meltzer9520ccae47a0
diff --git a/tests/unit/BaseTest.php b/tests/unit/BaseTest.phpindex 4bb208a025..16b171193a 100644--- a/tests/unit/BaseTest.php+++ b/tests/unit/BaseTest.php@@ -87,11 +87,11 @@ class BaseTest extends \Codeception\TestCase\Test);}- protected function createValidAsset($overrides = [], $qty = 1)+ protected function createValidAsset($overrides = []){$locId = $this->createValidLocation()->id;$this->createValidAssetModel();- return factory(\App\Models\Asset::class, $qty)->states('laptop-mbp')->create(+ return factory(\App\Models\Asset::class)->states('laptop-mbp')->create(array_merge(['rtd_location_id' => $locId,'location_id' => $locId,diff --git a/tests/unit/CategoryTest.php b/tests/unit/CategoryTest.phpindex 518cfa8134..a725010cfb 100644--- a/tests/unit/CategoryTest.php+++ b/tests/unit/CategoryTest.php@@ -38,8 +38,8 @@ class CategoryTest extends BaseTest$this->assertCount(5, $category->models);$models->each(function($model) {- // factory(App\Models\Asset::class, 2)->create(['model_id' => $model->id]);- $this->createValidAsset(['model_id' => $model->id], 2);+ $this->createValidAsset(['model_id' => $model->id]);+ $this->createValidAsset(['model_id' => $model->id]);});$this->assertEquals(10, $category->itemCount());}