aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-10-11 11:50:16 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-10-11 11:50:16 +0000
commit7e66378dc28da241e633ffb4ee4ece7afe1ee1ce (patch)
tree12cf9d0477e46f60964a367109c30bc5f09ba089 /tests/tests.cpp
parentd0738485bbcb2de6fd0e78f90437ac6aa27113e7 (diff)
downloadqxmpp-7e66378dc28da241e633ffb4ee4ece7afe1ee1ce.tar.gz
encode / decode presence photo hash to / from base64
Diffstat (limited to 'tests/tests.cpp')
-rw-r--r--tests/tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp
index 67217a81..3270a81f 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -437,7 +437,7 @@ void TestPackets::testPresenceWithVCardUpdate()
"<status>In a meeting</status>"
"<priority>5</priority>"
"<x xmlns=\"vcard-temp:x:update\">"
- "<photo>sha1-hash-of-image</photo>"
+ "<photo>Ve0tKBkyTOPyZrekN6VJl6ZZZfQ=</photo>"
"</x>"
"</presence>");
@@ -448,7 +448,7 @@ void TestPackets::testPresenceWithVCardUpdate()
QCOMPARE(presence.status().type(), QXmppPresence::Status::Away);
QCOMPARE(presence.status().statusText(), QString("In a meeting"));
QCOMPARE(presence.status().priority(), 5);
- QCOMPARE(presence.photoHash(), QByteArray("sha1-hash-of-image"));
+ QCOMPARE(presence.photoHash(), QByteArray::fromBase64("Ve0tKBkyTOPyZrekN6VJl6ZZZfQ="));
QCOMPARE(presence.vCardUpdateType(), QXmppPresence::PhotoAdvertised);
serializePacket(presence, xml);
}
@@ -461,7 +461,7 @@ void TestPackets::testPresenceWithCapability()
"<status>In a meeting</status>"
"<priority>5</priority>"
"<x xmlns=\"vcard-temp:x:update\">"
- "<photo>sha1-hash-of-image</photo>"
+ "<photo>Ve0tKBkyTOPyZrekN6VJl6ZZZfQ=</photo>"
"</x>"
"<c xmlns=\"http://jabber.org/protocol/caps\" hash=\"sha-1\" node=\"http://code.google.com/p/qxmpp\" ver=\"QgayPKawpkPSDYmwT/WM94uAlu0=\"/>"
"</presence>");
@@ -473,7 +473,7 @@ void TestPackets::testPresenceWithCapability()
QCOMPARE(presence.status().type(), QXmppPresence::Status::Away);
QCOMPARE(presence.status().statusText(), QString("In a meeting"));
QCOMPARE(presence.status().priority(), 5);
- QCOMPARE(presence.photoHash(), QByteArray("sha1-hash-of-image"));
+ QCOMPARE(presence.photoHash(), QByteArray::fromBase64("Ve0tKBkyTOPyZrekN6VJl6ZZZfQ="));
QCOMPARE(presence.vCardUpdateType(), QXmppPresence::PhotoAdvertised);
QCOMPARE(presence.capabilityHash(), QString("sha-1"));
QCOMPARE(presence.capabilityNode(), QString("http://code.google.com/p/qxmpp"));