From ef0f606b66711766671bddf5411f4c337502b0a5 Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Fri, 5 Nov 2010 17:21:02 +0000
Subject: [PATCH] Added a basic test for isSingleSignOnEnabled.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39987 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Wizard/tests/testERP5RemoteUserManager.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/product/ERP5Wizard/tests/testERP5RemoteUserManager.py b/product/ERP5Wizard/tests/testERP5RemoteUserManager.py
index 8f241b914f..b177e53382 100644
--- a/product/ERP5Wizard/tests/testERP5RemoteUserManager.py
+++ b/product/ERP5Wizard/tests/testERP5RemoteUserManager.py
@@ -117,6 +117,7 @@ class TestERP5RemoteUserManager(ERP5TypeTestCase):
     self.password = self.login + 'password'
     self.portal = self.getPortalObject()
     self.createDummyWitchTool()
+    self.was_sso_enable = self.portal.portal_wizard.isSingleSignOnEnabled()
     self.setUpRemoteUserManager()
     self.person_module = self.portal.person_module
     acl_users = self.portal.acl_users
@@ -395,6 +396,14 @@ class TestERP5RemoteUserManager(ERP5TypeTestCase):
     self.assertFalse(self.login in \
         self.erp5_remote_manager.remote_authentication_cache)
 
+  def test_is_single_sign_on_enable(self):
+    """ Check if isSingleSignOn is Enabled """
+    self.assertTrue(self.portal.portal_wizard.isSingleSignOnEnabled())
+    # Make sure single_sign_on_enable was not enabled before
+    # start the setup was made.
+    self.assertFalse(self.was_sso_enable)
+
+
 def test_suite():
   suite = unittest.TestSuite()
   suite.addTest(unittest.makeSuite(TestERP5RemoteUserManager))
-- 
2.30.9