Add session.c

This commit is contained in:
James Booth
2016-05-05 23:51:49 +01:00
parent f6fa63b374
commit 3bb1f12410
32 changed files with 723 additions and 525 deletions

View File

@@ -18,7 +18,7 @@
static void test_with_connection_status(jabber_conn_status_t status)
{
will_return(jabber_get_connection_status, status);
will_return(connection_get_status, status);
expect_cons_show("You are not currently connected.");
@@ -58,7 +58,7 @@ void cmd_rooms_uses_account_default_when_no_arg(void **state)
ProfAccount *account = account_new("testaccount", NULL, NULL, NULL, TRUE, NULL, 0, NULL, NULL, NULL,
0, 0, 0, 0, 0, strdup("default_conf_server"), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
will_return(jabber_get_connection_status, JABBER_CONNECTED);
will_return(connection_get_status, JABBER_CONNECTED);
will_return(jabber_get_account_name, "account_name");
expect_any(accounts_get_account, name);
will_return(accounts_get_account, account);
@@ -73,7 +73,7 @@ void cmd_rooms_arg_used_when_passed(void **state)
{
gchar *args[] = { "conf_server_arg" };
will_return(jabber_get_connection_status, JABBER_CONNECTED);
will_return(connection_get_status, JABBER_CONNECTED);
expect_string(iq_room_list_request, conferencejid, "conf_server_arg");