aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-07-16 16:15:38 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-07-16 16:15:38 +0200
commitda148da400d65db15e2749a7066b84c9bcbb9b43 (patch)
tree9401e058c7d4631d1aed816af61900f4f8613e04 /tests/tests.cpp
parent99bd8884bc87fbdbbe3a053f3afda9155b914c0f (diff)
parent0ae287b2c624df43b3744f79911d11baa0699c68 (diff)
downloadqxmpp-da148da400d65db15e2749a7066b84c9bcbb9b43.tar.gz
Merge branch 'master' of https://code.google.com/p/qxmpp
Diffstat (limited to 'tests/tests.cpp')
-rw-r--r--tests/tests.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp
index f67fbc4f..3a67fddc 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -224,6 +224,7 @@ void TestPackets::testArchiveChat()
">"
"<from secs=\"0\"><body>Art thou not Romeo, and a Montague?</body></from>"
"<to secs=\"11\"><body>Neither, fair saint, if either thee dislike.</body></to>"
+ "<from secs=\"7\"><body>How cam'st thou hither, tell me, and wherefore?</body></from>"
"</chat>"
"</iq>");
@@ -232,13 +233,16 @@ void TestPackets::testArchiveChat()
QCOMPARE(iq.type(), QXmppIq::Result);
QCOMPARE(iq.id(), QLatin1String("chat_1"));
QCOMPARE(iq.chat().with(), QLatin1String("juliet@capulet.com"));
- QCOMPARE(iq.chat().messages().size(), 2);
+ QCOMPARE(iq.chat().messages().size(), 3);
QCOMPARE(iq.chat().messages()[0].isReceived(), true);
QCOMPARE(iq.chat().messages()[0].body(), QLatin1String("Art thou not Romeo, and a Montague?"));
QCOMPARE(iq.chat().messages()[0].date(), QDateTime(QDate(1469, 7, 21), QTime(2, 56, 15), Qt::UTC));
QCOMPARE(iq.chat().messages()[1].isReceived(), false);
QCOMPARE(iq.chat().messages()[1].date(), QDateTime(QDate(1469, 7, 21), QTime(2, 56, 26), Qt::UTC));
QCOMPARE(iq.chat().messages()[1].body(), QLatin1String("Neither, fair saint, if either thee dislike."));
+ QCOMPARE(iq.chat().messages()[2].isReceived(), true);
+ QCOMPARE(iq.chat().messages()[2].date(), QDateTime(QDate(1469, 7, 21), QTime(2, 56, 33), Qt::UTC));
+ QCOMPARE(iq.chat().messages()[2].body(), QLatin1String("How cam'st thou hither, tell me, and wherefore?"));
serializePacket(iq, xml);
}