Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 13226)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 13227)
@@ -29,4 +29,5 @@
 from mechanize import LinkNotFoundError
 from zc.async.testing import wait_for_result
+from zope.securitypolicy.interfaces import IPrincipalRoleManager
 from zope.event import notify
 from zope.catalog.interfaces import ICatalog
@@ -438,4 +439,9 @@
 
     def test_add_delete_applicants(self):
+        # Check the global role map first
+        role_manager = IPrincipalRoleManager(grok.getSite())
+        principals = role_manager.getPrincipalsForRole('waeup.Applicant')
+        self.assertEqual(len(principals), 1)
+        self.assertEqual(principals[0][0], self.applicant.applicant_id)
         # Managers can add and delete applicants
         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
@@ -452,11 +458,20 @@
         self.browser.getControl("Create application record").click()
         self.assertTrue('Application initialized' in self.browser.contents)
+        # The global role map has been extended
+        role_manager = IPrincipalRoleManager(grok.getSite())
+        principals = role_manager.getPrincipalsForRole('waeup.Applicant')
+        self.assertEqual(len(principals), 2)
         self.browser.open(self.container_manage_path)
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
         ctrl = self.browser.getControl(name='val_id')
         value = ctrl.options[0]
+        self.assertEqual(principals[1][0].split('_')[1], value)
         ctrl.getControl(value=value).selected = True
         self.browser.getControl("Remove selected", index=0).click()
         self.assertTrue('Successfully removed:' in self.browser.contents)
+        # The global role map has been reduced
+        role_manager = IPrincipalRoleManager(grok.getSite())
+        principals = role_manager.getPrincipalsForRole('waeup.Applicant')
+        self.assertEqual(len(principals), 1)
         self.browser.open(self.add_applicant_path)
         self.browser.getControl(name="form.firstname").value = 'Albert'
