about summary refs log tree commit diff stats
path: root/tests/test_cmd_account.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cmd_account.c')
-rw-r--r--tests/test_cmd_account.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/test_cmd_account.c b/tests/test_cmd_account.c
index 1a49c571..553b0d83 100644
--- a/tests/test_cmd_account.c
+++ b/tests/test_cmd_account.c
@@ -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);
-}
\ No newline at end of file
+}