From 943f9ce87f6910672a71f025b3b3b6fef5085157 Mon Sep 17 00:00:00 2001 From: Lucas Carvalho <lucas@nexedi.com> Date: Thu, 14 Oct 2010 23:18:31 +0000 Subject: [PATCH] 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 --- product/ERP5/tests/testCRM.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/product/ERP5/tests/testCRM.py b/product/ERP5/tests/testCRM.py index 6eba62a4d1..95c629edf2 100644 --- a/product/ERP5/tests/testCRM.py +++ b/product/ERP5/tests/testCRM.py @@ -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. -- 2.30.9