commit 1c0857799f7e6c4e3194e9088b43bdfce08994ef
parent 3786ca5367e5afe240516f3165a124aae43b4c47
Author: srfsh <dev@srf.sh>
Date: Thu, 17 Nov 2022 18:02:30 +0300
ZenflowsTest.VF.EconomicResource.type: use Decimal.eq?/2 when to compare for equality
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/vf/economic_resource/type.test.exs b/test/vf/economic_resource/type.test.exs
@@ -81,9 +81,9 @@ describe "Query" do
assert data["classifiedAs"] == new.classified_as
assert data["conformsTo"]["id"] == new.conforms_to_id
assert data["accountingQuantity"]["hasUnit"]["id"] == new.accounting_quantity_has_unit_id
- assert data["accountingQuantity"]["hasNumericalValue"] == to_string(new.accounting_quantity_has_numerical_value)
+ assert Decimal.eq?(data["accountingQuantity"]["hasNumericalValue"], new.accounting_quantity_has_numerical_value)
assert data["onhandQuantity"]["hasUnit"]["id"] == new.onhand_quantity_has_unit_id
- assert data["onhandQuantity"]["hasNumericalValue"] == to_string(new.onhand_quantity_has_numerical_value)
+ assert Decimal.eq?(data["onhandQuantity"]["hasNumericalValue"], new.onhand_quantity_has_numerical_value)
assert data["primaryAccountable"]["id"] == new.primary_accountable_id
assert data["custodian"]["id"] == new.custodian_id
assert data["stage"]["id"] == new.stage_id