1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fixed broken test

This commit is contained in:
James Booth 2014-11-13 00:29:29 +00:00
parent 4e429fe788
commit 20dc44c0a9
3 changed files with 13 additions and 0 deletions

View File

@ -18,6 +18,7 @@ void console_doesnt_show_online_presence_when_set_none(void **state)
{
mock_cons_show_contact_online();
stub_ui_chat_win_contact_online();
stub_ui_roster();
prefs_set_string(PREF_STATUSES_CONSOLE, "none");
roster_init();
roster_add("test1@server", "bob", NULL, "both", FALSE);

View File

@ -28,6 +28,11 @@ void _stub_cons_show(const char * const msg, ...)
{
}
static
void _stub_ui_roster(void)
{
}
static
void _mock_cons_show_contact_online(PContact contact, Resource *resource, GDateTime *last_activity)
{
@ -200,6 +205,12 @@ stub_ui_chat_win_contact_online(void)
ui_chat_win_contact_online = _stub_ui_chat_win_contact_online;
}
void
stub_ui_roster(void)
{
ui_roster = _stub_ui_roster;
}
void
mock_cons_show_error(void)
{

View File

@ -10,6 +10,7 @@
#include "ui/window.h"
void stub_cons_show(void);
void stub_ui_roster(void);
void mock_cons_show(void);
void expect_cons_show(char *output);