mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-19 03:42:19 -06:00
[MIG] document_page: Migration to 9.0
This commit is contained in:
committed by
FernandoRomera
parent
705b5194a0
commit
e660a86201
21
document_page/tests/test_document_page_history.py
Normal file
21
document_page/tests/test_document_page_history.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from openerp.tests import common
|
||||
|
||||
|
||||
class TestDocumentPageHistory(common.TransactionCase):
|
||||
"""document_page_history test class."""
|
||||
|
||||
def test_page_history_demo_page1(self):
|
||||
"""Test page history demo page1."""
|
||||
page = self.env.ref('document_page.demo_page1')
|
||||
page.content = 'Test content updated'
|
||||
history_document = self.env['document.page.history']
|
||||
history_pages = history_document.search([('page_id', '=', page.id)])
|
||||
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.')
|
||||
Reference in New Issue
Block a user