Unless Discussion Item has an workflow, moderation is not enabled

svn path=/plone.app.discussion/trunk/; revision=49135
This commit is contained in:
Erico Andrei
2011-04-27 17:41:07 +00:00
parent 3a224784b0
commit 1a751b495f
2 changed files with 19 additions and 13 deletions
@@ -47,6 +47,9 @@ class ModerationViewTest(unittest.TestCase):
"""Make sure that moderation_enabled returns true if the comment
workflow implements a 'pending' state.
"""
# If workflow is not set, enabled must return False
self.wf_tool.setChainForPortalTypes(('Discussion Item',),())
self.assertEqual(self.view.moderation_enabled(), False)
# The one_state_workflow does not have a 'pending' state
self.wf_tool.setChainForPortalTypes(('Discussion Item',),
('one_state_workflow,'))
@@ -77,7 +80,6 @@ class ModerationViewTest(unittest.TestCase):
self.assertTrue('No comments to moderate' in view)
self.assertEqual(len(self.view.comments), 0)
class ModerationBulkActionsViewTest(unittest.TestCase):
layer = PLONE_APP_DISCUSSION_INTEGRATION_TESTING