diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-05-28 16:09:32 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-05-28 16:09:32 +0200 |
commit | ceb5dcc0e589f441a6570a74fef1478b46a91f24 (patch) | |
tree | 8dd4e554d15275af6e3ab7b167ffd28a390b88ef | |
parent | d4692b1b2dfc6eca947d3d5cbe19901306837ccd (diff) | |
download | profani-tty-ceb5dcc0e589f441a6570a74fef1478b46a91f24.tar.gz |
Fix clears_chat_sessions unittest
-rw-r--r-- | tests/unittests/test_cmd_disconnect.c | 2 | ||||
-rw-r--r-- | tests/unittests/xmpp/stub_xmpp.c | 5 |
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; |