diff options
author | James Booth <boothj5@gmail.com> | 2015-07-20 22:35:14 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-07-20 22:35:14 +0100 |
commit | d40998c4affcb76acea42b25455deb087f544dfc (patch) | |
tree | 1c1e918a026aab8de6a93b367d509be699456e09 /tests/functionaltests/test_receipts.c | |
parent | d54cbf126aa520adf3ea43b28f5c39d96e12fbd6 (diff) | |
download | profani-tty-d40998c4affcb76acea42b25455deb087f544dfc.tar.gz |
Added reciept send functional test
Diffstat (limited to 'tests/functionaltests/test_receipts.c')
-rw-r--r-- | tests/functionaltests/test_receipts.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/functionaltests/test_receipts.c b/tests/functionaltests/test_receipts.c index 0360fda8..357663f3 100644 --- a/tests/functionaltests/test_receipts.c +++ b/tests/functionaltests/test_receipts.c @@ -27,3 +27,24 @@ send_receipt_request(void **state) "</message>" )); } + +void +send_receipt_on_request(void **state) +{ + prof_input("/receipts send on"); + + prof_connect(); + + stbbr_send( + "<message id=\"msg12213\" type=\"chat\" to=\"stabber@localhost/profanity\" from=\"someuser@server.org/profanity\">" + "<body>Wants a receipt</body>" + "<request xmlns=\"urn:xmpp:receipts\"/>" + "</message>" + ); + + assert_true(stbbr_received( + "<message id=\"*\" to=\"someuser@server.org/profanity\">" + "<received id=\"msg12213\" xmlns=\"urn:xmpp:receipts\"/>" + "</message>" + )); +} |