1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-29 19:56:07 -04:00
profanity/tests/test_command.c

25 lines
545 B
C
Raw Normal View History

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