test: Basic Payment Entry for Employee

This commit is contained in:
Rucha Mahabal 2022-07-11 14:36:33 +05:30
parent cd9a01be5f
commit 5a51951224
2 changed files with 6 additions and 1 deletions

View File

@ -1175,8 +1175,8 @@ def validate_inclusive_tax(tax, doc):
@frappe.whitelist() @frappe.whitelist()
# nosemgrep
def get_outstanding_reference_documents(args): def get_outstanding_reference_documents(args):
if isinstance(args, str): if isinstance(args, str):
args = json.loads(args) args = json.loads(args)

View File

@ -20,6 +20,7 @@ from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import (
create_sales_invoice_against_cost_center, create_sales_invoice_against_cost_center,
) )
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
from erpnext.setup.doctype.employee.test_employee import make_employee
test_dependencies = ["Item"] test_dependencies = ["Item"]
@ -736,6 +737,10 @@ class TestPaymentEntry(FrappeTestCase):
self.assertTrue("is on hold" in str(err.exception).lower()) self.assertTrue("is on hold" in str(err.exception).lower())
def test_payment_entry_for_employee(self):
employee = make_employee("test_payment_entry@salary.com", company="_Test Company")
create_payment_entry(party_type="Employee", party=employee, save=True)
def create_payment_entry(**args): def create_payment_entry(**args):
payment_entry = frappe.new_doc("Payment Entry") payment_entry = frappe.new_doc("Payment Entry")