code coverage rogress

This commit is contained in:
Gervais Naoussi 2015-12-08 15:41:11 +01:00
parent e49136b80b
commit 086e98aa98

View File

@ -12,6 +12,10 @@ class TestDocumentPageHistory(common.TransactionCase):
page.content = 'Test content updated'
history_document = self.env['document.page.history']
history_pages = history_document.search([('page_id', '=', page.id)])
history_document.with_context(
active_ids=[i.id for i in history_pages]
).get_diff()
active_ids = [i.id for i in history_pages]
result = history_document.getDiff(active_ids[0], active_ids[0])
self.assertEqual(result, 'There are no changes in revisions.')
result = history_document.getDiff(active_ids[0], active_ids[1])
self.assertNotEqual(result, 'There are no changes in revisions.')