From 7a5ec796ea663901aadf1735956b12118ea85dcc Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 23 Mar 2012 12:13:59 +0000 Subject: test archive remove iq --- tests/tests.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/tests.cpp') 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( + "" + "" + ""); + + 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( -- cgit v1.2.3