From 2874c0cafddeb5c1155f973ce82fa2af412836b6 Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@tiolive.com>
Date: Fri, 11 Mar 2011 22:52:17 +0000
Subject: [PATCH] add test to script Base_getPreferencePathList

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44219 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py | 14 +++++++++++++-
 bt5/erp5_web_ung_theme/bt/revision                 |  2 +-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py b/bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py
index 612ff1b358..35b9e666bb 100644
--- a/bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py
+++ b/bt5/erp5_web_ung_theme/TestTemplateItem/testUNG.py
@@ -343,4 +343,16 @@ class TestUNG(ERP5TypeTestCase):
     self.stepTic()
     gadget = self.portal.portal_catalog.getResultValue(portal_type="Gadget",
                                                        validation_state="visible")
-    self.assertEquals(gadget_id, gadget.getId())
\ No newline at end of file
+    self.assertEquals(gadget_id, gadget.getId())
+
+  def testBase_getPreferencePathList(self):
+    """Test if the paths of preference objects are returned correctly"""
+    self.logout()
+    self.assertEquals(json.loads(self.portal.Base_getPreferencePathList()), None)
+    self.login("ERP5TypeTestCase")
+    preference_dict = json.loads(self.portal.Base_getPreferencePathList())
+    self.assertEquals(preference_dict, {})
+    self.portal.portal_preferences.ung_preference.enable()
+    self.stepTic()
+    preference_dict = json.loads(self.portal.Base_getPreferencePathList())
+    self.assertEquals(preference_dict["preference"], "portal_preferences/ung_preference")
\ No newline at end of file
diff --git a/bt5/erp5_web_ung_theme/bt/revision b/bt5/erp5_web_ung_theme/bt/revision
index 8975db9a05..65de5029b4 100644
--- a/bt5/erp5_web_ung_theme/bt/revision
+++ b/bt5/erp5_web_ung_theme/bt/revision
@@ -1 +1 @@
-293
\ No newline at end of file
+294
\ No newline at end of file
-- 
2.30.9