test: validation for no name specified

This commit is contained in:
Rucha Mahabal 2022-01-31 13:49:37 +05:30
parent 66c8fb9cfa
commit 62331fcba3

View file

@ -248,6 +248,13 @@ class TestNaming(unittest.TestCase):
})
self.assertRaises(frappe.NameError, tag.insert)
# case 4: no name specified
tag = frappe.get_doc({
'doctype': 'Tag',
'__newname': ''
})
self.assertRaises(frappe.ValidationError, tag.insert)
def make_invalid_todo():
frappe.get_doc({