aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-03-23 12:13:59 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2012-03-23 12:13:59 +0000
commit7a5ec796ea663901aadf1735956b12118ea85dcc (patch)
tree5e4d374c45c2edc4b4f583c5a20b9806e8cd322e /tests/tests.cpp
parent53a32bbc23220c52e281394d0c1c210816472c7f (diff)
downloadqxmpp-7a5ec796ea663901aadf1735956b12118ea85dcc.tar.gz
test archive remove iq
Diffstat (limited to 'tests/tests.cpp')
-rw-r--r--tests/tests.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp
index 3ea651a1..ddc9ccfd 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -234,6 +234,24 @@ void TestPackets::testArchiveChat()
serializePacket(iq, xml);
}
+void TestPackets::testArchiveRemove()
+{
+ const QByteArray xml(
+ "<iq id=\"remove_1\" type=\"set\">"
+ "<remove xmlns=\"urn:xmpp:archive\" with=\"juliet@capulet.com\""
+ " start=\"1469-07-21T02:00:00Z\" end=\"1479-07-21T04:00:00Z\"/>"
+ "</iq>");
+
+ QXmppArchiveRemoveIq iq;
+ parsePacket(iq, xml);
+ QCOMPARE(iq.type(), QXmppIq::Set);
+ QCOMPARE(iq.id(), QLatin1String("remove_1"));
+ QCOMPARE(iq.with(), QLatin1String("juliet@capulet.com"));
+ QCOMPARE(iq.start(), QDateTime(QDate(1469, 7, 21), QTime(2, 0, 0), Qt::UTC));
+ QCOMPARE(iq.end(), QDateTime(QDate(1479, 7, 21), QTime(4, 0, 0), Qt::UTC));
+ serializePacket(iq, xml);
+}
+
void TestPackets::testArchiveRetrieve()
{
const QByteArray xml(