summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2012-05-31 13:46:23 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-01 18:26:21 +0200
commitd756da3214b372df92c987a8152dc3f10a93580b (patch)
treee513c68e7cce1ade48b753f38b68f498f691f1b1 /tests
parent701d2d0d955a5cccb21243d45eae70fc8c6575f8 (diff)
Implemented Flush request for private partitions.
Change-Id: I29d8b4df901b7739ef6760755d16998377b696bd Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qjsondbrequest/testqjsondbrequest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qjsondbrequest/testqjsondbrequest.cpp b/tests/auto/qjsondbrequest/testqjsondbrequest.cpp
index 05893293..94fb4b08 100644
--- a/tests/auto/qjsondbrequest/testqjsondbrequest.cpp
+++ b/tests/auto/qjsondbrequest/testqjsondbrequest.cpp
@@ -44,6 +44,7 @@
#include "qjsondbreadrequest.h"
#include "qjsondbwriterequest.h"
#include "private/qjsondbstandardpaths_p.h"
+#include "private/qjsondbflushrequest_p.h"
#include "testhelper.h"
#include <QDebug>
@@ -111,6 +112,7 @@ private slots:
void replaceFromNull();
void multiplerequests();
void defaultConnection();
+ void privatePartitionFlushRequest();
void dontAllowDefaultAndRemovablePartition_data();
void dontAllowDefaultAndRemovablePartition();
@@ -1209,6 +1211,19 @@ void TestQJsonDbRequest::defaultConnection()
QCOMPARE((int)request.status(), (int)QJsonDbRequest::Finished);
}
+void TestQJsonDbRequest::privatePartitionFlushRequest()
+{
+ QJsonDbFlushRequest request;
+ request.setPartition(QStringLiteral("Private"));
+ QVERIFY(mConnection->send(&request));
+ QVERIFY(waitForResponse(&request));
+ QVERIFY(mRequestStatuses.contains(&request));
+ QList<QtJsonDb::QJsonDbRequest::Status> statuses = mRequestStatuses.value(&request);
+ QCOMPARE(statuses.size(), 2);
+ QCOMPARE((int)statuses.at(0), (int)QJsonDbRequest::Receiving);
+ QCOMPARE((int)statuses.at(1), (int)QJsonDbRequest::Finished);
+}
+
void TestQJsonDbRequest::bindings()
{
{