mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-14 09:51:27 -06:00

* [MIG] Migration to version 10.0 * [FIX] Comments and CI errors * [FIX] ValueError: External ID not found in the system: base.menu_base_partner * [FIX] ValueError: Wrong value for ir.actions.act_window.target: 'inlineview' * [FIX] Based on @lasley comments * [FIX] External ID not found in the system: base.group_document_user
22 lines
827 B
Python
22 lines
827 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo.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.')
|