test: Update demo setup test
diff --git a/erpnext/setup/doctype/company/test_company.py b/erpnext/setup/doctype/company/test_company.py
index 0ed9621..babd7dd 100644
--- a/erpnext/setup/doctype/company/test_company.py
+++ b/erpnext/setup/doctype/company/test_company.py
@@ -202,9 +202,14 @@
 		company_name = frappe.db.get_value("Company", {"name": ("like", "%(Demo)")})
 		self.assertTrue(company_name)
 
+		for transaction in frappe.get_hooks("demo_transaction_doctypes"):
+			self.assertTrue(frappe.db.exists(frappe.unscrub(transaction), {"company": company_name}))
+
 		clear_demo_data()
 		company_name = frappe.db.get_value("Company", {"name": ("like", "%(Demo)")})
 		self.assertFalse(company_name)
+		for transaction in frappe.get_hooks("demo_transaction_doctypes"):
+			self.assertFalse(frappe.db.exists(frappe.unscrub(transaction), {"company": company_name}))
 
 
 def create_company_communication(doctype, docname):