about summary refs log tree commit diff stats
path: root/tests/test_command.c
blob: 1373803242d4da6325127f71799072c88a081445 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>

#include "xmpp/xmpp.h"
#include "ui/ui.h"
#include "command/command.h"

void cmd_rooms_shows_message_when_not_connected(void **state)
{
    will_return(jabber_get_connection_status, JABBER_DISCONNECTED);
    expect_string(cons_show, msg, "You are not currently connected.");
    CommandHelp *help = malloc(sizeof(CommandHelp));

    assert_true(_cmd_rooms(NULL, *help));

    free(help);
}