From 73e88faa00a99ca67487c7913eed64fc1d2e91d3 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Date: Tue, 25 Sep 2018 16:01:21 -0500 Subject: [PATCH] Using changes proposed by dmeltzer to eliminate has_licenses function in some tests code (#6218) --- tests/unit/DepreciationTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/DepreciationTest.php b/tests/unit/DepreciationTest.php index bb31de772c..b883b891b1 100644 --- a/tests/unit/DepreciationTest.php +++ b/tests/unit/DepreciationTest.php @@ -39,11 +39,11 @@ class DepreciationTest extends BaseTest { $category = $this->createValidCategory('license-graphics-category'); $depreciation = $this->createValidDepreciation('computer', ['name' => 'New Depreciation']); - $licenses = factory(App\Models\License::class, 5)->states('photoshop')->create([ + $licenses = factory(App\Models\LicenseModel::class, 5)->states('photoshop')->create([ 'depreciation_id'=>$depreciation->id, 'category_id' => $category->id ]); - $this->assertEquals(5,$depreciation->has_licenses()); + $this->assertEquals(5,$depreciation->licenses()->count()); } }