From 22c5db18d7eb1a0c806aed4706f226d89adb7175 Mon Sep 17 00:00:00 2001 From: Gabriel Monnerat <gabriel@tiolive.com> Date: Fri, 18 Mar 2011 18:54:37 +0000 Subject: [PATCH] Add new test git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44443 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../TestTemplateItem/testUNGSecurity.py | 14 ++++++++++++++ bt5/erp5_web_ung_role/bt/revision | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py b/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py index e89ecc7c97..4f028abf82 100644 --- a/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py +++ b/bt5/erp5_web_ung_role/TestTemplateItem/testUNGSecurity.py @@ -200,3 +200,17 @@ class TestUNGSecurity(ERP5TypeTestCase): self.login("ung_user2") preference_dict = json.loads(self.portal.Base_getPreferencePathList()) self.assertEquals(preference_dict, {u'preference': u'portal_preferences/2'}) + + def testWebPage_shareDocument(self): + """ """ + self.login("ung_user") + self.portal.ERP5Site_createNewWebDocument("web_page_template") + self.stepTic() + web_page = self.portal.portal_catalog.getResultValue(portal_type="Web Page") + self.assertEquals(web_page.getValidationState(), "draft") + response = web_page.WebPage_shareDocument() + self.stepTic() + self.assertEquals(response, "".join((self.portal.absolute_url(), + "/?key=", + web_page.getReference()))) + self.assertEquals(web_page.getValidationState(), "shared") \ No newline at end of file diff --git a/bt5/erp5_web_ung_role/bt/revision b/bt5/erp5_web_ung_role/bt/revision index a5c750feac..368f89ceef 100644 --- a/bt5/erp5_web_ung_role/bt/revision +++ b/bt5/erp5_web_ung_role/bt/revision @@ -1 +1 @@ -27 \ No newline at end of file +28 \ No newline at end of file -- 2.30.9