mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Add failing test
This commit is contained in:
parent
d696ed8a5a
commit
da8999f59a
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Unit\Transformers;
|
||||||
|
|
||||||
|
use App\Http\Transformers\DepreciationReportTransformer;
|
||||||
|
use App\Models\Asset;
|
||||||
|
use App\Models\Depreciation;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class DepreciationReportTransformerTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testHandlesModelDepreciationMonthsBeingZero()
|
||||||
|
{
|
||||||
|
$asset = Asset::factory()->create();
|
||||||
|
$depreciation = Depreciation::factory()->create(['months' => 0]);
|
||||||
|
$asset->model->depreciation()->associate($depreciation);
|
||||||
|
|
||||||
|
$transformer = new DepreciationReportTransformer;
|
||||||
|
|
||||||
|
$result = $transformer->transformAsset($asset);
|
||||||
|
|
||||||
|
$this->assertIsArray($result);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue