Skip to content

Commit

Permalink
test: test for property setter old doc check (#1786)
Browse files Browse the repository at this point in the history
* test: test case to validate customize form

* test: test case to validate customize form

* test: test case to validate old_doc is protected or not

---------

Co-authored-by: Ninad Parikh <[email protected]>
  • Loading branch information
Ninad1306 and Ninad1306 authored Feb 28, 2024
1 parent 19234ae commit de65699
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,12 @@ def test_validate_property_setter_where_audit_trail_enabled_and_doc_is_protected
re.compile(r"^(Cannot change the Track Changes property for*)"),
doc.delete,
)
doc.reload()
doc.doc_type = "Address"
self.assertRaisesRegex(
frappe.ValidationError,
re.compile(r"^(Cannot change the Track Changes property for*)"),
doc.save,
)
frappe.db.set_single_value("Accounts Settings", "enable_audit_trail", 0)
doc.delete()

0 comments on commit de65699

Please sign in to comment.