Commit 931362fa authored by Jérome Perrin's avatar Jérome Perrin

When an email is ingested, we try to find the related campaign, for now, just

try that we don't blindly get the first campaign.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17880 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bb552e15
......@@ -52,6 +52,7 @@ class TestCRMMailIngestion(ERP5TypeTestCase):
# set prefered file name regular expression
pref = portal.portal_preferences.default_site_preference
pref.setPreferredDocumentFileNameRegularExpression('.*')
pref.setPreferredDocumentReferenceRegularExpression('.*')
pref.enable()
# XXX do this in ERP5Site.py ?
......@@ -139,6 +140,20 @@ class TestCRMMailIngestion(ERP5TypeTestCase):
get_transaction().commit()
self.tic()
self.assertEquals('person_module/me', event.getDestination())
def test_follow_up(self):
# follow up is found automatically, based on the content of the mail, and
# what you defined in preference regexpr.
# But, we don't want it to associate with the first campaign simply
# because we searched against nothing
self.portal.campaign_module.newContent(portal_type='Campaign')
get_transaction().commit()
self.tic()
event = self._ingestMail('simple')
get_transaction().commit()
self.tic()
self.assertEquals(None, event.getFollowUp())
## TODO:
## def test_forwarder_mail(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment