diff --git a/plone/app/discussion/tests/test_comment.py b/plone/app/discussion/tests/test_comment.py index 0feae32..1962a7d 100644 --- a/plone/app/discussion/tests/test_comment.py +++ b/plone/app/discussion/tests/test_comment.py @@ -115,9 +115,11 @@ class CommentTest(PloneTestCase): str(new_comment1_id), comment.absolute_url()) def test_workflow(self): + """Basic test for the 'comment_review_workflow' + """ self.portal.portal_workflow.setChainForPortalTypes( ('Discussion Item',), - ('simple_publication_workflow,')) + ('comment_review_workflow,')) conversation = IConversation(self.portal.doc1) comment1 = createObject('plone.Comment') @@ -125,17 +127,17 @@ class CommentTest(PloneTestCase): comment = conversation[new_comment1_id] + # Make sure comments use the 'comment_review_workflow' chain = self.portal.portal_workflow.getChainFor(comment) - self.assertEquals(('simple_publication_workflow',), chain) + self.assertEquals(('comment_review_workflow',), chain) - # ensure the initial state was entered and recorded + # Ensure the initial state was entered and recorded self.assertEquals(1, - len(comment.workflow_history['simple_publication_workflow'])) + len(comment.workflow_history['comment_review_workflow'])) self.assertEquals(None, - comment.workflow_history['simple_publication_workflow'][0]\ + comment.workflow_history['comment_review_workflow'][0]\ ['action']) - - self.assertEquals('private', + self.assertEquals('pending', self.portal.portal_workflow.getInfoFor(comment, 'review_state')) def test_fti(self): diff --git a/plone/app/discussion/tests/test_comments_viewlet.py b/plone/app/discussion/tests/test_comments_viewlet.py index 75d46af..31e682c 100644 --- a/plone/app/discussion/tests/test_comments_viewlet.py +++ b/plone/app/discussion/tests/test_comments_viewlet.py @@ -261,7 +261,7 @@ class TestCommentsViewlet(PloneTestCase): # Enable moderation workflow self.portal.portal_workflow.setChainForPortalTypes( ('Discussion Item',), - ('simple_publication_workflow,')) + ('comment_review_workflow,')) # Check if workflow actions are available reply = self.viewlet.get_replies(workflow_actions=True).next() self.failUnless(reply.has_key('actions'))