fix: complete InvesteMoz validation and error corrections
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\User;
|
||||
@@ -27,11 +28,11 @@ final class IvaServiceNormalDraftTest extends TestCase
|
||||
$store = json_decode($recovered['modelo_a_snapshot'], true, flags: JSON_THROW_ON_ERROR);
|
||||
$book = $store['serviceNormals']['opportunity:347'];
|
||||
$this->assertCount(3, $book['rows']);
|
||||
$this->assertSame(['free_company_service','private_company_asset_use','exempt_sector_asset_use'], array_column($book['rows'], 'treatment'));
|
||||
$this->assertSame(['500.25','700.50','900.75'], array_column($book['result']['rows'], 'baseAmount'));
|
||||
$this->assertSame(['determined','determined','determined'], array_column($book['result']['rows'], 'status'));
|
||||
$this->assertSame([null,null,null], array_column($book['result']['rows'], 'vat'));
|
||||
$this->assertSame([null,null,null], array_column($book['result']['rows'], 'rate'));
|
||||
$this->assertSame(['free_company_service', 'private_company_asset_use', 'exempt_sector_asset_use'], array_column($book['rows'], 'treatment'));
|
||||
$this->assertSame(['500.25', '700.50', '900.75'], array_column($book['result']['rows'], 'baseAmount'));
|
||||
$this->assertSame(['determined', 'determined', 'determined'], array_column($book['result']['rows'], 'status'));
|
||||
$this->assertSame([null, null, null], array_column($book['result']['rows'], 'vat'));
|
||||
$this->assertSame([null, null, null], array_column($book['result']['rows'], 'rate'));
|
||||
$this->assertArrayNotHasKey('priorDeduction', $book['rows'][0]['conditions']);
|
||||
$this->assertSame('yes', $book['rows'][1]['conditions']['priorDeduction']);
|
||||
$this->assertSame('yes', $book['rows'][2]['conditions']['exemptSector']);
|
||||
@@ -53,4 +54,3 @@ final class IvaServiceNormalDraftTest extends TestCase
|
||||
file_put_contents(base_path('outputs/iva-l1-g7i-service-normal-20261024/recovered.json'), json_encode($recovered, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user