diff options
author | Florian Geyer <blueice@fobos.de> | 2014-05-16 12:51:22 +0400 |
---|---|---|
committer | Florian Geyer <blueice@fobos.de> | 2014-05-16 12:51:22 +0400 |
commit | c2940a8f18070b502eca96fc2b616d219c558332 (patch) | |
tree | fd2a6ad1d460e3da37e7d4be11432622e25048bd /tests/TestEntrySearcher.cpp | |
parent | 4f60df029d28f7e6f89d2b17405e878be03c307e (diff) |
Extend TestEntrySearcher.
Diffstat (limited to 'tests/TestEntrySearcher.cpp')
-rw-r--r-- | tests/TestEntrySearcher.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/TestEntrySearcher.cpp b/tests/TestEntrySearcher.cpp index fec2a4ae2..b37992df9 100644 --- a/tests/TestEntrySearcher.cpp +++ b/tests/TestEntrySearcher.cpp @@ -92,7 +92,6 @@ void TestEntrySearcher::testSearch() e3b->setGroup(group3); m_searchResult = m_entrySearcher.search("search term", m_groupRoot, Qt::CaseInsensitive); - QCOMPARE(m_searchResult.count(), 3); m_searchResult = m_entrySearcher.search("search term", group211, Qt::CaseInsensitive); @@ -130,3 +129,17 @@ void TestEntrySearcher::testAndConcatenationInSearch() m_searchResult = m_entrySearcher.search("abc kl", m_groupRoot, Qt::CaseInsensitive); QCOMPARE(m_searchResult.count(), 1); } + +void TestEntrySearcher::testAllAttributesAreSearched() +{ + Entry* entry = new Entry(); + entry->setGroup(m_groupRoot); + + entry->setTitle("testTitle"); + entry->setUsername("testUsername"); + entry->setUrl("testUrl"); + entry->setNotes("testNote"); + + m_searchResult = m_entrySearcher.search("testTitle testUsername testUrl testNote", m_groupRoot, Qt::CaseInsensitive); + QCOMPARE(m_searchResult.count(), 1); +} |