Commit 943f9ce8 authored by Lucas Carvalho's avatar Lucas Carvalho

Added a new test to check if the Support Request has the reference generated automatically.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39207 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e3cd3458
......@@ -365,6 +365,29 @@ class TestCRM(BaseTestCRM):
self.assertEqual(new_event.getTextContent(), '> Event Content')
self.assertEqual(new_event.getTitle(), 'Re: Event Title')
def test_SupportRequest_referenceAutomaticallyGenerated(self):
"""
When you create or clone a Support Request document, it must
have the reference generated automatically.
"""
portal_type = "Support Request"
title = "Title of the Support Request"
content = "This is the content of the Support Request"
module = self.portal.support_request_module
support_request = module.newContent(portal_type=portal_type,
title=title,)
self.stepTic()
self.assertNotEquals(None, support_request.getReference())
new_support_request = support_request.Base_createCloneDocument(
batch_mode=1)
self.assertEquals(new_support_request.getTitle(), title)
self.assertNotEquals(None, support_request.getReference())
self.assertNotEquals(support_request.getReference(),
new_support_request.getReference())
class TestCRMMailIngestion(BaseTestCRM):
"""Test Mail Ingestion for standalone CRM.
......
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