Skip to content

Commit

Permalink
test(External Contact): add unit test
Browse files Browse the repository at this point in the history
(cherry picked from commit 5282a6a)
  • Loading branch information
barredterra authored and mergify[bot] committed Mar 1, 2024
1 parent bf158f7 commit a387078
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Copyright (c) 2022, Real Experts GmbH and Contributors
# See license.txt

# import frappe
import unittest
import frappe
from frappe.tests.utils import FrappeTestCase


class TestExternalContact(unittest.TestCase):
pass
class TestExternalContact(FrappeTestCase):
def test_autoname(self):
contacts = frappe.get_all("External Contact", pluck="name")
self.assertIn("EXT-REG-0001", contacts)
self.assertIn("EXT-REG-0002", contacts)

def test_full_name(self):
self.assertTrue(frappe.db.exists("External Contact", {"full_name": "Jane Doe"}))

0 comments on commit a387078

Please sign in to comment.