about summary refs log tree commit diff stats
path: root/tests/functionaltests/test_receipts.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functionaltests/test_receipts.c')
-rw-r--r--tests/functionaltests/test_receipts.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/functionaltests/test_receipts.c b/tests/functionaltests/test_receipts.c
new file mode 100644
index 00000000..0360fda8
--- /dev/null
+++ b/tests/functionaltests/test_receipts.c
@@ -0,0 +1,29 @@
+#include <glib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <stabber.h>
+#include <expect.h>
+
+#include "proftest.h"
+
+void
+send_receipt_request(void **state)
+{
+    prof_input("/receipts request on");
+
+    prof_connect();
+
+    prof_input("/msg somejid@someserver.com Hi there");
+
+    assert_true(stbbr_received(
+        "<message id=\"*\" type=\"chat\" to=\"somejid@someserver.com\">"
+            "<body>Hi there</body>"
+            "<request xmlns=\"urn:xmpp:receipts\"/>"
+        "</message>"
+    ));
+}