commit ed9e4ba1e05ca818866ed418ccfbe748863eecc3
parent 67e8c8c00b2b600811b48be4aec1cd958e41dcaa
Author: srfsh <dev@srf.sh>
Date: Thu, 17 Nov 2022 17:52:21 +0300
ZenflowsTest.VF.EconomicEvent.Domain: simplify is-equal-to 0 logic
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/vf/economic_event/domain.test.exs b/test/vf/economic_event/domain.test.exs
@@ -853,7 +853,7 @@ describe "`create/2` with transferCustody:" do
assert to_res.primary_accountable_id == params.receiver_id
assert to_res.custodian_id == params.receiver_id
- assert to_string(to_res.accounting_quantity_has_numerical_value) == "0"
+ assert Decimal.eq?(to_res.accounting_quantity_has_numerical_value, 0)
assert to_res.accounting_quantity_has_unit_id == params.resource_quantity.has_unit_id
assert to_res.onhand_quantity_has_numerical_value == params.resource_quantity.has_numerical_value
assert to_res.onhand_quantity_has_unit_id == params.resource_quantity.has_unit_id
@@ -1121,7 +1121,7 @@ describe "`create/2` with transferAllRights:" do
assert to_res.custodian_id == params.receiver_id
assert to_res.accounting_quantity_has_numerical_value == params.resource_quantity.has_numerical_value
assert to_res.accounting_quantity_has_unit_id == params.resource_quantity.has_unit_id
- assert to_string(to_res.onhand_quantity_has_numerical_value) == "0"
+ assert Decimal.eq?(to_res.onhand_quantity_has_numerical_value, 0)
assert to_res.onhand_quantity_has_unit_id == params.resource_quantity.has_unit_id
from(r in EconomicResource,