|
|
@@ -239,6 +239,9 @@ class TestNotification(unittest.TestCase): |
|
|
|
|
|
|
|
self.assertTrue(email_queue) |
|
|
|
|
|
|
|
# check if description is changed after alert since set_property_after_alert is set |
|
|
|
self.assertEquals(todo.description, 'Changed by Notification') |
|
|
|
|
|
|
|
recipients = [d.recipient for d in email_queue.recipients] |
|
|
|
self.assertTrue('test2@example.com' in recipients) |
|
|
|
self.assertTrue('test1@example.com' in recipients) |
|
|
@@ -271,19 +274,4 @@ class TestNotification(unittest.TestCase): |
|
|
|
self.assertTrue('test2@example.com' in recipients) |
|
|
|
self.assertTrue('test1@example.com' in recipients) |
|
|
|
|
|
|
|
def test_change_property_value_after_alert(self): |
|
|
|
todo = frappe.new_doc('ToDo') |
|
|
|
todo.description = 'Test Property Change after Alert' |
|
|
|
todo.save() |
|
|
|
|
|
|
|
#change status of todo |
|
|
|
todo.status = 'Closed' |
|
|
|
todo.save() |
|
|
|
|
|
|
|
email_queue = frappe.get_doc('Email Queue', {'reference_doctype': 'ToDo', |
|
|
|
'reference_name': todo.name}) |
|
|
|
|
|
|
|
self.assertTrue(email_queue) |
|
|
|
self.assertEquals(todo.description, 'Changed by Notification') |
|
|
|
|
|
|
|
|