Commit 1f45486f authored by Ivan Tyagov's avatar Ivan Tyagov

Test getting workflow event history.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38623 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 104f8e95
......@@ -2109,6 +2109,28 @@ return 1
self.assertSameSet([x.getObject() for x in document1.Document_getOtherVersionDocumentList()], \
[web_page1])
def test_Base_getWorkflowEventInfoList(self):
"""
Test getting history of an object.
"""
portal = self.portal
document = portal.document_module.newContent(portal_type="Presentation")
document.edit(title='New')
document.publish()
document.reject()
document.share()
logged_in_user = str(self.portal.portal_membership.getAuthenticatedMember())
event_list = document.Base_getWorkflowEventInfoList()
event_list.reverse()
# all actions by logged in user
for event in event_list:
self.assertEquals(event.actor, logged_in_user)
self.assertEquals(event_list[0].action, 'Edit')
self.assertEquals(event_list[-1].action, 'Share Document')
self.assertEquals(event_list[-2].action, 'Reject Document')
self.assertEquals(event_list[-3].action, 'Publish Document')
class TestDocumentWithSecurity(TestDocumentMixin):
username = 'yusei'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment