diff options
author | James Booth <boothj5@gmail.com> | 2013-12-26 15:17:46 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-12-26 15:17:46 +0000 |
commit | b466809245f125f4c85c85e72cce0d167315aea8 (patch) | |
tree | 26502d95c141dd4524cbf820d3fc8465705336d7 /tests/test_cmd_account.c | |
parent | a2c0dab4741b8a9455e4bba1802d593a8458d882 (diff) | |
download | profani-tty-b466809245f125f4c85c85e72cce0d167315aea8.tar.gz |
Added test for showing message when changing priority
Diffstat (limited to 'tests/test_cmd_account.c')
-rw-r--r-- | tests/test_cmd_account.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/test_cmd_account.c b/tests/test_cmd_account.c index 6d7a6d85..204f0985 100644 --- a/tests/test_cmd_account.c +++ b/tests/test_cmd_account.c @@ -947,7 +947,27 @@ void cmd_account_set_dnd_priority_sets_preference(void **state) free(help); } -// test message shown when set +void cmd_account_set_online_priority_shows_message(void **state) +{ + mock_cons_show(); + mock_accounts_account_exists(); + stub_accounts_set_priorities(); + CommandHelp *help = malloc(sizeof(CommandHelp)); + gchar *args[] = { "set", "a_account", "online", "10", NULL }; + + accounts_account_exists_return(TRUE); + + mock_connection_status(JABBER_DISCONNECTED); + + expect_cons_show("Updated online priority for account a_account: 10"); + expect_cons_show(""); + + gboolean result = cmd_account(args, *help); + assert_true(result); + + free(help); + +} // test invalid priority low // test invalid priority high // test presence updated when connected as account and current presence equals setting |