Moved pgp signature generation to cl_ev_presence_send

This commit is contained in:
James Booth
2015-05-08 00:07:21 +01:00
parent 0db7bcbdcd
commit acd2d2309f
7 changed files with 49 additions and 27 deletions

View File

@@ -926,6 +926,8 @@ void cmd_account_set_priority_updates_presence_when_account_connected_with_prese
{
CommandHelp *help = malloc(sizeof(CommandHelp));
gchar *args[] = { "set", "a_account", "online", "10", NULL };
ProfAccount *account = account_new("a_account", "a_jid", NULL, NULL, TRUE, NULL, 5222, "a_resource",
NULL, NULL, 10, 10, 10, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
expect_any(accounts_account_exists, account_name);
will_return(accounts_account_exists, TRUE);
@@ -934,16 +936,22 @@ void cmd_account_set_priority_updates_presence_when_account_connected_with_prese
expect_any(accounts_set_priority_online, value);
will_return(jabber_get_connection_status, JABBER_CONNECTED);
will_return(jabber_get_account_name, "a_account");
expect_any(accounts_get_last_presence, account_name);
will_return(accounts_get_last_presence, RESOURCE_ONLINE);
will_return(jabber_get_account_name, "a_account");
will_return(jabber_get_account_name, "a_account");
expect_any(accounts_get_account, name);
will_return(accounts_get_account, account);
will_return(jabber_get_presence_message, "Free to chat");
expect_value(presence_send, status, RESOURCE_ONLINE);
expect_string(presence_send, msg, "Free to chat");
expect_value(presence_send, idle, 0);
expect_value(presence_send, signed_status, NULL);
expect_cons_show("Updated online priority for account a_account: 10");
expect_cons_show("");