Fix current tests

This commit is contained in:
Peter Vilim
2015-01-07 21:03:51 -06:00
parent b4f37b9e31
commit 6af10696f9
5 changed files with 24 additions and 11 deletions

View File

@@ -35,7 +35,7 @@ void cmd_account_shows_usage_when_not_connected_and_no_args(void **state)
void cmd_account_shows_account_when_connected_and_no_args(void **state)
{
CommandHelp *help = malloc(sizeof(CommandHelp));
ProfAccount *account = account_new("jabber_org", "me@jabber.org", NULL,
ProfAccount *account = account_new("jabber_org", "me@jabber.org", NULL, NULL,
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL);
gchar *args[] = { NULL };
@@ -108,7 +108,7 @@ void cmd_account_show_shows_account_when_exists(void **state)
{
CommandHelp *help = malloc(sizeof(CommandHelp));
gchar *args[] = { "show", "account_name", NULL };
ProfAccount *account = account_new("jabber_org", "me@jabber.org", NULL,
ProfAccount *account = account_new("jabber_org", "me@jabber.org", NULL, NULL,
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL);
expect_any(accounts_get_account, name);
@@ -477,10 +477,16 @@ void cmd_account_set_password_sets_password(void **state)
{
CommandHelp *help = malloc(sizeof(CommandHelp));
gchar *args[] = { "set", "a_account", "password", "a_password", NULL };
ProfAccount *account = account_new("a_account", NULL, NULL, NULL,
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL);
expect_any(accounts_account_exists, account_name);
will_return(accounts_account_exists, TRUE);
expect_string(accounts_get_account, name, "a_account");
will_return(accounts_get_account, account);
expect_string(accounts_set_password, account_name, "a_account");
expect_string(accounts_set_password, value, "a_password");
@@ -940,4 +946,4 @@ void cmd_account_clear_shows_message_when_invalid_property(void **state)
assert_true(result);
free(help);
}
}