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:
parent
4e429fe788
commit
20dc44c0a9
@ -18,6 +18,7 @@ void console_doesnt_show_online_presence_when_set_none(void **state)
|
|||||||
{
|
{
|
||||||
mock_cons_show_contact_online();
|
mock_cons_show_contact_online();
|
||||||
stub_ui_chat_win_contact_online();
|
stub_ui_chat_win_contact_online();
|
||||||
|
stub_ui_roster();
|
||||||
prefs_set_string(PREF_STATUSES_CONSOLE, "none");
|
prefs_set_string(PREF_STATUSES_CONSOLE, "none");
|
||||||
roster_init();
|
roster_init();
|
||||||
roster_add("test1@server", "bob", NULL, "both", FALSE);
|
roster_add("test1@server", "bob", NULL, "both", FALSE);
|
||||||
|
@ -28,6 +28,11 @@ void _stub_cons_show(const char * const msg, ...)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void _stub_ui_roster(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
void _mock_cons_show_contact_online(PContact contact, Resource *resource, GDateTime *last_activity)
|
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;
|
ui_chat_win_contact_online = _stub_ui_chat_win_contact_online;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
stub_ui_roster(void)
|
||||||
|
{
|
||||||
|
ui_roster = _stub_ui_roster;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
mock_cons_show_error(void)
|
mock_cons_show_error(void)
|
||||||
{
|
{
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "ui/window.h"
|
#include "ui/window.h"
|
||||||
|
|
||||||
void stub_cons_show(void);
|
void stub_cons_show(void);
|
||||||
|
void stub_ui_roster(void);
|
||||||
|
|
||||||
void mock_cons_show(void);
|
void mock_cons_show(void);
|
||||||
void expect_cons_show(char *output);
|
void expect_cons_show(char *output);
|
||||||
|
Loading…
Reference in New Issue
Block a user