mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Added reciept send functional test
This commit is contained in:
parent
d54cbf126a
commit
d40998c4af
@ -67,6 +67,7 @@ int main(int argc, char* argv[]) {
|
||||
PROF_FUNC_TEST(receive_self_carbon),
|
||||
|
||||
PROF_FUNC_TEST(send_receipt_request),
|
||||
PROF_FUNC_TEST(send_receipt_on_request),
|
||||
};
|
||||
|
||||
return run_tests(all_tests);
|
||||
|
@ -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>"
|
||||
));
|
||||
}
|
||||
|
@ -1,2 +1,3 @@
|
||||
void send_receipt_request(void **state);
|
||||
void send_receipt_on_request(void **state);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user