Ignore arguments that are not part of test

This commit is contained in:
James Booth
2013-12-15 20:02:25 +00:00
parent 7842b0d1fc
commit 9b631cf571

View File

@@ -75,15 +75,15 @@ void cmd_connect_with_altdomain_when_provided(void **state)
will_return(jabber_get_connection_status, JABBER_DISCONNECTED); will_return(jabber_get_connection_status, JABBER_DISCONNECTED);
expect_string(accounts_get_account, name, "user@server.org"); expect_any(accounts_get_account, name);
will_return(accounts_get_account, NULL); will_return(accounts_get_account, NULL);
will_return(ui_ask_password, strdup("password")); will_return(ui_ask_password, strdup("password"));
expect_string(cons_show, output, "Connecting as user@server.org"); expect_any(cons_show, output);
expect_string(jabber_connect_with_details, jid, "user@server.org"); expect_any(jabber_connect_with_details, jid);
expect_string(jabber_connect_with_details, passwd, "password"); expect_any(jabber_connect_with_details, passwd);
expect_string(jabber_connect_with_details, altdomain, "altdomain"); expect_string(jabber_connect_with_details, altdomain, "altdomain");
will_return(jabber_connect_with_details, JABBER_CONNECTING); will_return(jabber_connect_with_details, JABBER_CONNECTING);
@@ -96,20 +96,20 @@ void cmd_connect_with_altdomain_when_provided(void **state)
void cmd_connect_fail_message(void **state) void cmd_connect_fail_message(void **state)
{ {
CommandHelp *help = malloc(sizeof(CommandHelp)); CommandHelp *help = malloc(sizeof(CommandHelp));
gchar *args[] = { "user@server.org", "altdomain" }; gchar *args[] = { "user@server.org", NULL };
will_return(jabber_get_connection_status, JABBER_DISCONNECTED); will_return(jabber_get_connection_status, JABBER_DISCONNECTED);
expect_string(accounts_get_account, name, "user@server.org"); expect_any(accounts_get_account, name);
will_return(accounts_get_account, NULL); will_return(accounts_get_account, NULL);
will_return(ui_ask_password, strdup("password")); will_return(ui_ask_password, strdup("password"));
expect_string(cons_show, output, "Connecting as user@server.org"); expect_any(cons_show, output);
expect_string(jabber_connect_with_details, jid, "user@server.org"); expect_any(jabber_connect_with_details, jid);
expect_string(jabber_connect_with_details, passwd, "password"); expect_any(jabber_connect_with_details, passwd);
expect_string(jabber_connect_with_details, altdomain, "altdomain"); expect_any(jabber_connect_with_details, altdomain);
will_return(jabber_connect_with_details, JABBER_DISCONNECTED); will_return(jabber_connect_with_details, JABBER_DISCONNECTED);
expect_string(cons_show_error, output, "Connection attempt for user@server.org failed."); expect_string(cons_show_error, output, "Connection attempt for user@server.org failed.");