test: another test case for index duplication
This commit is contained in:
parent
06becac459
commit
9b2283092e
1 changed files with 8 additions and 0 deletions
|
|
@ -128,6 +128,14 @@ class TestDBUpdate(FrappeTestCase):
|
|||
doctype.save()
|
||||
self.check_unique_indexes(doctype.name, field)
|
||||
|
||||
# New column with a unique index
|
||||
# This works because index name is same as fieldname.
|
||||
new_field = frappe.copy_doc(doctype.fields[0])
|
||||
new_field.fieldname = "duplicate_field"
|
||||
doctype.append("fields", new_field)
|
||||
doctype.save()
|
||||
self.check_unique_indexes(doctype.name, new_field.fieldname)
|
||||
|
||||
doctype.delete()
|
||||
frappe.db.commit()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue