mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-15 15:38:39 +00:00
test: use a role-less user for the permission check
test@example.com carries System Manager in the frappe fixtures, so on a fresh CI site it can read Delivery Note and the lookup legitimately returns the draft. test1@example.com has no roles, making the no-permission assertion environment-independent.
This commit is contained in:
@@ -49,6 +49,7 @@ class TestDraftLinks(ERPNextTestSuite):
|
||||
dn = make_delivery_note(so.name)
|
||||
dn.insert()
|
||||
|
||||
with self.set_user("test@example.com"):
|
||||
# test1@example.com has no roles, so no read permission on Delivery Note
|
||||
with self.set_user("test1@example.com"):
|
||||
drafts = get_existing_drafts("Sales Order", so.name, "Delivery Note")
|
||||
self.assertEqual(drafts, [])
|
||||
|
||||
Reference in New Issue
Block a user