X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/462982faa361c79daab43ce526ae64646b1ea63c..0fc218fd264adf0f67396409cdd1d44265c71f07:/src/tests/dolphinquerytest.cpp diff --git a/src/tests/dolphinquerytest.cpp b/src/tests/dolphinquerytest.cpp index 464404058..2b025eed7 100644 --- a/src/tests/dolphinquerytest.cpp +++ b/src/tests/dolphinquerytest.cpp @@ -11,14 +11,16 @@ #include #include #include +#include #include #include -class DolphinSearchBoxTest : public QObject +class DolphinQueryTest : public QObject { Q_OBJECT -private slots: +private Q_SLOTS: + void initTestCase(); void testBalooSearchParsing_data(); void testBalooSearchParsing(); }; @@ -45,10 +47,15 @@ QUrl balooQueryUrl(const QString& searchString) return searchUrl; } +void DolphinQueryTest::initTestCase() +{ + QStandardPaths::setTestModeEnabled(true); +} + /** * Defines the parameters for the test cases in testBalooSearchParsing() */ -void DolphinSearchBoxTest::testBalooSearchParsing_data() +void DolphinQueryTest::testBalooSearchParsing_data() { QTest::addColumn("searchUrl"); @@ -153,7 +160,7 @@ void DolphinSearchBoxTest::testBalooSearchParsing_data() * properly handled by the searchbox, and only "user" or filename terms are added to the * text bar of the searchbox. */ -void DolphinSearchBoxTest::testBalooSearchParsing() +void DolphinQueryTest::testBalooSearchParsing() { QFETCH(QUrl, searchUrl); QFETCH(QString, expectedText); @@ -183,6 +190,6 @@ void DolphinSearchBoxTest::testBalooSearchParsing() QCOMPARE(query.hasFileName(), hasFileName); } -QTEST_MAIN(DolphinSearchBoxTest) +QTEST_MAIN(DolphinQueryTest) #include "dolphinquerytest.moc"