From aed9d2260968b916efd85efb85a982bb6a5c3c2f Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 5 Jul 2022 19:51:58 +0530 Subject: [PATCH] fix: incorrect default fraction for USD (#17415) fix: correct fraction for El Salvador --- frappe/geo/country_info.json | 2 +- frappe/geo/doctype/currency/test_currency.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frappe/geo/country_info.json b/frappe/geo/country_info.json index 94d1f3ed37..ed44b1c7f8 100644 --- a/frappe/geo/country_info.json +++ b/frappe/geo/country_info.json @@ -842,7 +842,7 @@ "El Salvador": { "code": "sv", "currency": "USD", - "currency_fraction": "Centavo", + "currency_fraction": "Cent", "currency_fraction_units": 100, "smallest_currency_fraction_value": 0.01, "currency_name": "Dolar estadounidense", diff --git a/frappe/geo/doctype/currency/test_currency.py b/frappe/geo/doctype/currency/test_currency.py index f93a452462..b02dd4258c 100644 --- a/frappe/geo/doctype/currency/test_currency.py +++ b/frappe/geo/doctype/currency/test_currency.py @@ -4,5 +4,10 @@ # pre loaded import frappe +from frappe.tests.utils import FrappeTestCase -test_records = frappe.get_test_records("Currency") + +class TestUser(FrappeTestCase): + def test_default_currency_on_setup(self): + usd = frappe.get_doc("Currency", "USD") + self.assertDocumentEqual({"enabled": 1, "fraction": "Cent"}, usd)