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,12 +28,12 @@ final class IvaValueReviewDraftTest extends TestCase
|
||||
$store = json_decode($recovered['modelo_a_snapshot'], true, flags: JSON_THROW_ON_ERROR);
|
||||
$book = $store['valueReviews']['opportunity:346'];
|
||||
$this->assertCount(2, $book['rows']);
|
||||
$this->assertSame(['price_comparison','referenced_correction'], array_column($book['rows'], 'treatment'));
|
||||
$this->assertSame(['1000.25','1400.75'], array_column($book['result']['rows'], 'baseAmount'));
|
||||
$this->assertSame(['determined','determined'], array_column($book['result']['rows'], 'status'));
|
||||
$this->assertSame([null,null], array_column($book['result']['rows'], 'vat'));
|
||||
$this->assertSame([null,null], array_column($book['result']['rows'], 'rate'));
|
||||
$this->assertSame(['below','below'], array_column($book['result']['rows'], 'comparison'));
|
||||
$this->assertSame(['price_comparison', 'referenced_correction'], array_column($book['rows'], 'treatment'));
|
||||
$this->assertSame(['1000.25', '1400.75'], array_column($book['result']['rows'], 'baseAmount'));
|
||||
$this->assertSame(['determined', 'determined'], array_column($book['result']['rows'], 'status'));
|
||||
$this->assertSame([null, null], array_column($book['result']['rows'], 'vat'));
|
||||
$this->assertSame([null, null], array_column($book['result']['rows'], 'rate'));
|
||||
$this->assertSame(['below', 'below'], array_column($book['result']['rows'], 'comparison'));
|
||||
$this->assertSame('1000.25', $book['rows'][0]['declaredAmount']);
|
||||
$this->assertSame('1500.50', $book['rows'][0]['referenceAmount']);
|
||||
$this->assertSame('1400.75', $book['rows'][1]['correctedAmount']);
|
||||
@@ -57,4 +58,3 @@ final class IvaValueReviewDraftTest extends TestCase
|
||||
file_put_contents(base_path('outputs/iva-l1-g7h-value-review-20261024/recovered.json'), json_encode($recovered, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user