Added test for /otr theirfp when in console

This commit is contained in:
James Booth
2014-02-17 22:14:33 +00:00
parent 82ad0cd306
commit 4afec6ab5e
5 changed files with 43 additions and 0 deletions

View File

@@ -387,6 +387,22 @@ void cmd_otr_myfp_shows_my_fingerprint(void **state)
free(help);
}
void cmd_otr_theirfp_shows_message_when_in_console(void **state)
{
CommandHelp *help = malloc(sizeof(CommandHelp));
gchar *args[] = { "theirfp", NULL };
mock_connection_status(JABBER_CONNECTED);
mock_current_win_type(WIN_CONSOLE);
mock_ui_current_print_line();
ui_current_print_line_expect("You must be in a regular chat window to view a recipient's fingerprint.");
gboolean result = cmd_otr(args, *help);
assert_true(result);
free(help);
}
#else
void cmd_otr_shows_message_when_otr_unsupported(void **state)
{