about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-03-10 21:16:34 +0000
committerJames Booth <boothj5@gmail.com>2015-03-10 21:16:34 +0000
commit2ff6873cf1ad4ca3c78947f5e3372d1da5a0b7d3 (patch)
tree3689896b22e111b8ed21b489cc219d7b0f984f19 /tests
parent3c1e8c4e154600b8b7aeb60bbf316e39a97ece27 (diff)
downloadprofani-tty-2ff6873cf1ad4ca3c78947f5e3372d1da5a0b7d3.tar.gz
Send private carbons element with message when encrypted
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cmd_otr.c4
-rw-r--r--tests/xmpp/stub_xmpp.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_cmd_otr.c b/tests/test_cmd_otr.c
index c6c6f7cf..dae17947 100644
--- a/tests/test_cmd_otr.c
+++ b/tests/test_cmd_otr.c
@@ -551,8 +551,8 @@ cmd_otr_start_sends_otr_query_message_to_current_recipeint(void **state)
     will_return(otr_key_loaded, TRUE);
     will_return(otr_start_query, query_message);
 
-    expect_string(message_send_chat, barejid, chatwin->barejid);
-    expect_string(message_send_chat, msg, query_message);
+    expect_string(message_send_chat_encrypted, barejid, chatwin->barejid);
+    expect_string(message_send_chat_encrypted, msg, query_message);
 
     gboolean result = cmd_otr(args, *help);
     assert_true(result);
diff --git a/tests/xmpp/stub_xmpp.c b/tests/xmpp/stub_xmpp.c
index dc9a258e..9ca0c2d4 100644
--- a/tests/xmpp/stub_xmpp.c
+++ b/tests/xmpp/stub_xmpp.c
@@ -64,6 +64,12 @@ void message_send_chat(const char * const barejid, const char * const msg)
     check_expected(msg);
 }
 
+void message_send_chat_encrypted(const char * const barejid, const char * const msg)
+{
+    check_expected(barejid);
+    check_expected(msg);
+}
+
 void message_send_private(const char * const fulljid, const char * const msg) {}
 void message_send_groupchat(const char * const roomjid, const char * const msg) {}
 void message_send_groupchat_subject(const char * const roomjid, const char * const subject) {}