Added mocks and stubs for cons_show

This commit is contained in:
James Booth
2013-12-19 21:05:39 +00:00
parent b27c5d0f5b
commit d56f6dc39b
10 changed files with 183 additions and 122 deletions

View File

@@ -9,15 +9,17 @@
#include "xmpp/mock_xmpp.h"
#include "ui/ui.h"
#include "ui/mock_ui.h"
#include "command/commands.h"
static void test_with_connection_status(jabber_conn_status_t status)
{
mock_cons_show();
CommandHelp *help = malloc(sizeof(CommandHelp));
mock_connection_status(status);
expect_string(cons_show, output, "You are not currently connected.");
expect_cons_show("You are not currently connected.");
gboolean result = cmd_rooms(NULL, *help);
assert_true(result);