1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-08 19:34:14 -04:00
profanity/tests/test_command.c
2013-12-14 17:15:43 +00:00

25 lines
545 B
C

#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <glib.h>
#include "xmpp/xmpp.h"
#include "ui/ui.h"
#include "command/command.h"
void cmd_rooms_shows_message_when_not_connected(void **state)
{
CommandHelp *help = malloc(sizeof(CommandHelp));
will_return(jabber_get_connection_status, JABBER_DISCONNECTED);
expect_string(cons_show, msg, "You are not currently connected.");
gboolean result = _cmd_rooms(NULL, *help);
assert_true(result);
free(help);
}