summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/test_message_compose.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/test_mail/tests/test_message_compose.py')
-rw-r--r--addons/test_mail/tests/test_message_compose.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/test_mail/tests/test_message_compose.py b/addons/test_mail/tests/test_message_compose.py
index 2397023db24..b756d52d510 100644
--- a/addons/test_mail/tests/test_message_compose.py
+++ b/addons/test_mail/tests/test_message_compose.py
@@ -205,17 +205,19 @@ class TestMessagePost(BaseFunctionalTest, MockEmails, TestRecipients):
def test_post_notify(self):
self.user_employee.write({'notification_type': 'inbox'})
- new_notification = self.env['mail.thread'].message_notify(
+ new_notification = self.test_record.message_notify(
subject='This should be a subject',
body='<p>You have received a notification</p>',
partner_ids=[(4, self.partner_1.id), (4, self.user_employee.partner_id.id)],
)
self.assertEqual(new_notification.subtype_id, self.env.ref('mail.mt_note'))
+ self.assertEqual(new_notification.message_type, 'user_notification')
self.assertEqual(new_notification.body, '<p>You have received a notification</p>')
self.assertEqual(new_notification.author_id, self.env.user.partner_id)
self.assertEqual(new_notification.email_from, formataddr((self.env.user.name, self.env.user.email)))
self.assertEqual(new_notification.needaction_partner_ids, self.partner_1 | self.user_employee.partner_id)
+ self.assertNotIn(new_notification, self.test_record.message_ids)
class TestComposer(BaseFunctionalTest, MockEmails, TestRecipients):