[Erp5-report] r24423 - /erp5/trunk/products/ERP5/tests/testCRM.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 30 15:05:49 CET 2008


Author: rafael
Date: Thu Oct 30 15:05:47 2008
New Revision: 24423

URL: http://svn.erp5.org?rev=24423&view=rev
Log:
Added test for Mark Posted

Modified:
    erp5/trunk/products/ERP5/tests/testCRM.py

Modified: erp5/trunk/products/ERP5/tests/testCRM.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testCRM.py?rev=24423&r1=24422&r2=24423&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testCRM.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testCRM.py [utf8] Thu Oct 30 15:05:47 2008
@@ -702,6 +702,23 @@
       # this means no message have been set
       self.assertEquals((), self.portal.MailHost._last_message)
 
+  def test_MailMarkPosted(self):
+    # mark_started_action transition on event workflow will not send an email
+    # even if the portal type is a Mail Message
+    for ptype in self.portal.getPortalEventTypeList():
+      event = self.portal.event_module.newContent(portal_type=ptype)
+      event.setSource('person_module/me')
+      event.setDestination('person_module/recipient')
+      event.setTextContent('Hello !')
+      self.portal.portal_workflow.doActionFor(event, 'receive_action')
+      self.portal.portal_workflow.doActionFor(event, 'mark_started_action')
+
+      get_transaction().commit()
+      self.tic()
+      # this means no message have been set
+      self.assertEquals((), self.portal.MailHost._last_message)
+
+
   def test_MailMessageHTML(self):
     # test sending a mail message edited as HTML (the default with FCKEditor),
     # then the mail should have HTML.




More information about the Erp5-report mailing list