about summary refs log tree commit diff stats
path: root/tests/test_cmd_account.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-12-15 23:39:04 +0000
committerJames Booth <boothj5@gmail.com>2013-12-15 23:39:04 +0000
commitb2f4570886dd5c69ccd62fe8d39b4a51b8df356f (patch)
tree412001cfca4fa2fb9d922c598a6daf8ecdb10c2b /tests/test_cmd_account.c
parent85629cb9a3eaf5a7c88abe4bc4de899828465590 (diff)
downloadprofani-tty-b2f4570886dd5c69ccd62fe8d39b4a51b8df356f.tar.gz
Test "/account add" shows message on success
Diffstat (limited to 'tests/test_cmd_account.c')
-rw-r--r--tests/test_cmd_account.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_cmd_account.c b/tests/test_cmd_account.c
index f6f14366..6a6cb062 100644
--- a/tests/test_cmd_account.c
+++ b/tests/test_cmd_account.c
@@ -149,3 +149,19 @@ void cmd_account_add_adds_account(void **state)
 
     free(help);
 }
+
+void cmd_account_add_shows_message(void **state)
+{
+    CommandHelp *help = malloc(sizeof(CommandHelp));
+    gchar *args[] = { "add", "new_account", NULL };
+
+    expect_any(accounts_add, jid);
+
+    expect_string(cons_show, output, "Account created.");;
+    expect_string(cons_show, output, "");
+
+    gboolean result = cmd_account(args, *help);
+    assert_true(result);
+
+    free(help);
+}