diff options
author | James Booth <boothj5@gmail.com> | 2014-01-22 22:22:01 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-01-22 22:22:01 +0000 |
commit | 21ab18215164fe791ebda7e6158648f63790ed93 (patch) | |
tree | 1c26f12558beeb773ec15d55320020c65ffd2028 /tests/test_cmd_account.c | |
parent | bbdf2bea58b0c84054ead85aa2a93f86560f1568 (diff) | |
download | profani-tty-21ab18215164fe791ebda7e6158648f63790ed93.tar.gz |
Refactored ProfAccount creation
Diffstat (limited to 'tests/test_cmd_account.c')
-rw-r--r-- | tests/test_cmd_account.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test_cmd_account.c b/tests/test_cmd_account.c index 4891930c..51bb33f2 100644 --- a/tests/test_cmd_account.c +++ b/tests/test_cmd_account.c @@ -38,9 +38,9 @@ void cmd_account_shows_account_when_connected_and_no_args(void **state) { mock_cons_show_account(); mock_accounts_get_account(); - stub_accounts_free_account(); CommandHelp *help = malloc(sizeof(CommandHelp)); - ProfAccount *account = malloc(sizeof(ProfAccount)); + ProfAccount *account = account_new("jabber_org", "me@jabber.org", NULL, + TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL); gchar *args[] = { NULL }; mock_connection_status(JABBER_CONNECTED); @@ -54,7 +54,6 @@ void cmd_account_shows_account_when_connected_and_no_args(void **state) assert_true(result); free(help); - free(account); } void cmd_account_list_shows_accounts(void **state) @@ -117,10 +116,10 @@ void cmd_account_show_shows_account_when_exists(void **state) { mock_cons_show_account(); mock_accounts_get_account(); - stub_accounts_free_account(); CommandHelp *help = malloc(sizeof(CommandHelp)); gchar *args[] = { "show", "account_name", NULL }; - ProfAccount *account = malloc(sizeof(ProfAccount)); + ProfAccount *account = account_new("jabber_org", "me@jabber.org", NULL, + TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL); accounts_get_account_return(account); |