Commit 1753e782 authored by Ivan Tyagov's avatar Ivan Tyagov

Test more search cases.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33496 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 901c6686
......@@ -754,6 +754,12 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
description = 'This test make sure that scriptable key feature on ZSQLCatalog works.',
language='fr',
version = '002')
document_3 = portal.document_module.newContent(
portal_type = 'Presentation',
title = "Complete set of tested reports with a long title.",
version = '003',
language = 'bg',
reference = 'tio-test-doc-3')
person = portal.person_module.newContent(portal_type = 'Person', \
reference= "john",
title='John Doe Great')
......@@ -782,6 +788,13 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
getAdvancedSearchTextResultList('make'))
self.assertSameSet([web_page, person], \
getAdvancedSearchTextResultList("Great"))
# full text search with whole title of a document
self.assertSameSet([document_3], \
getAdvancedSearchTextResultList(document_3.getTitle()))
# full text search with reference part of searchable_text
# (i.e. not specified with 'reference:' - simply part of search text)
self.assertSameSet([document_3], \
getAdvancedSearchTextResultList(document_3.getReference()))
# full text search with reference
self.assertSameSet([web_page], \
......
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