From 9b631cf57173f1ddf371531da16da06070d39a52 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 15 Dec 2013 20:02:25 +0000 Subject: [PATCH] Ignore arguments that are not part of test --- tests/test_cmd_connect.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/test_cmd_connect.c b/tests/test_cmd_connect.c index 0092d5e4..c60b4679 100644 --- a/tests/test_cmd_connect.c +++ b/tests/test_cmd_connect.c @@ -75,15 +75,15 @@ void cmd_connect_with_altdomain_when_provided(void **state) 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(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_string(jabber_connect_with_details, passwd, "password"); + expect_any(jabber_connect_with_details, jid); + expect_any(jabber_connect_with_details, passwd); expect_string(jabber_connect_with_details, altdomain, "altdomain"); 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) { 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); - expect_string(accounts_get_account, name, "user@server.org"); + expect_any(accounts_get_account, name); will_return(accounts_get_account, NULL); 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_string(jabber_connect_with_details, passwd, "password"); - expect_string(jabber_connect_with_details, altdomain, "altdomain"); + expect_any(jabber_connect_with_details, jid); + expect_any(jabber_connect_with_details, passwd); + expect_any(jabber_connect_with_details, altdomain); will_return(jabber_connect_with_details, JABBER_DISCONNECTED); expect_string(cons_show_error, output, "Connection attempt for user@server.org failed.");