about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-05-28 16:09:32 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-05-28 16:09:32 +0200
commitceb5dcc0e589f441a6570a74fef1478b46a91f24 (patch)
tree8dd4e554d15275af6e3ab7b167ffd28a390b88ef
parentd4692b1b2dfc6eca947d3d5cbe19901306837ccd (diff)
downloadprofani-tty-ceb5dcc0e589f441a6570a74fef1478b46a91f24.tar.gz
Fix clears_chat_sessions unittest
-rw-r--r--tests/unittests/test_cmd_disconnect.c2
-rw-r--r--tests/unittests/xmpp/stub_xmpp.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/unittests/test_cmd_disconnect.c b/tests/unittests/test_cmd_disconnect.c
index f5813fdb..0d46d532 100644
--- a/tests/unittests/test_cmd_disconnect.c
+++ b/tests/unittests/test_cmd_disconnect.c
@@ -22,7 +22,7 @@ void clears_chat_sessions(void **state)
     chat_session_recipient_active("mike@server.org", "work", FALSE);
 
     will_return(connection_get_status, JABBER_CONNECTED);
-    will_return(connection_get_fulljid, "myjid@myserver.com");
+    will_return(connection_get_barejid, strdup("myjid@myserver.com"));
     expect_any_cons_show();
 
     gboolean result = cmd_disconnect(NULL, CMD_DISCONNECT, NULL);
diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c
index c6583889..193579d4 100644
--- a/tests/unittests/xmpp/stub_xmpp.c
+++ b/tests/unittests/xmpp/stub_xmpp.c
@@ -34,6 +34,11 @@ const char * connection_get_fulljid(void)
     return mock_ptr_type(char *);
 }
 
+char* connection_get_barejid(void)
+{
+    return mock_ptr_type(char *);
+}
+
 const char * connection_get_domain(void)
 {
     return NULL;