about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-10-19 00:57:01 +0100
committerJames Booth <boothj5@gmail.com>2015-10-19 00:57:01 +0100
commit496616256e7be273833499814d80fdb1915cec13 (patch)
tree246dcba8aa909eae6cbc00db78ac883094e35a05 /tests
parent6640a0891fb51b74c8377745ee1e5585f741a0be (diff)
downloadprofani-tty-496616256e7be273833499814d80fdb1915cec13.tar.gz
Fixed test_cmd_rooms.c
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_cmd_rooms.c19
1 files changed, 3 insertions, 16 deletions
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");