From 081175e7d57557a0e233beb9cafec2fc89a917db Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 23 Aug 2010 09:18:16 +0000 Subject: test parsing of archive "retrieve" iqs --- tests/tests.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests/tests.cpp') diff --git a/tests/tests.cpp b/tests/tests.cpp index 3eb90450..bbc8b286 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -125,6 +125,28 @@ void TestPackets::testArchiveList() serializePacket(iq, xml); } +void TestPackets::testArchiveRetrieve() +{ + const QByteArray xml( + "" + "" + "" + "30" + "" + "" + ""); + + QXmppArchiveRetrieveIq iq; + parsePacket(iq, xml); + QCOMPARE(iq.type(), QXmppIq::Get); + QCOMPARE(iq.id(), QLatin1String("retrieve_1")); + QCOMPARE(iq.with(), QLatin1String("juliet@capulet.com")); + QCOMPARE(iq.start(), QDateTime(QDate(1469, 7, 21), QTime(2, 0, 0), Qt::UTC)); + QCOMPARE(iq.max(), 30); + serializePacket(iq, xml); +} + void TestPackets::testBindNoResource() { const QByteArray xml( -- cgit v1.2.3