From 496616256e7be273833499814d80fdb1915cec13 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 19 Oct 2015 00:57:01 +0100 Subject: Fixed test_cmd_rooms.c --- tests/unittests/test_cmd_rooms.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'tests/unittests/test_cmd_rooms.c') diff --git a/tests/unittests/test_cmd_rooms.c b/tests/unittests/test_cmd_rooms.c index 4251d9de..c01ec606 100644 --- a/tests/unittests/test_cmd_rooms.c +++ b/tests/unittests/test_cmd_rooms.c @@ -54,22 +54,9 @@ void cmd_rooms_shows_message_when_undefined(void **state) void cmd_rooms_uses_account_default_when_no_arg(void **state) { gchar *args[] = { NULL }; - ProfAccount *account = malloc(sizeof(ProfAccount)); - account->name = NULL; - account->jid = NULL; - account->password = NULL; - account->eval_password = NULL; - account->resource = NULL; - account->server = NULL; - account->last_presence = NULL; - account->login_presence = NULL; - account->muc_nick = NULL; - account->otr_policy = NULL; - account->otr_manual = NULL; - account->otr_opportunistic = NULL; - account->otr_always = NULL; - account->pgp_keyid = NULL; - account->muc_service = strdup("default_conf_server"); + + ProfAccount *account = account_new("testaccount", NULL, NULL, NULL, TRUE, NULL, 0, NULL, NULL, NULL, + 0, 0, 0, 0, 0, strdup("default_conf_server"), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); will_return(jabber_get_connection_status, JABBER_CONNECTED); will_return(jabber_get_account_name, "account_name"); -- cgit 1.4.1-2-gfad0