mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-12 16:44:08 -08:00
Using changes proposed by dmeltzer to eliminate has_licenses function in some tests code (#6218)
This commit is contained in:
parent
bcf9d2f75c
commit
73e88faa00
|
@ -39,11 +39,11 @@ class DepreciationTest extends BaseTest
|
||||||
{
|
{
|
||||||
$category = $this->createValidCategory('license-graphics-category');
|
$category = $this->createValidCategory('license-graphics-category');
|
||||||
$depreciation = $this->createValidDepreciation('computer', ['name' => 'New Depreciation']);
|
$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,
|
'depreciation_id'=>$depreciation->id,
|
||||||
'category_id' => $category->id
|
'category_id' => $category->id
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertEquals(5,$depreciation->has_licenses());
|
$this->assertEquals(5,$depreciation->licenses()->count());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue