about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-11-13 00:29:29 +0000
committerJames Booth <boothj5@gmail.com>2014-11-13 00:29:29 +0000
commit20dc44c0a9c30839793234e7ce797976848c4e1b (patch)
tree22bc9b0e67c8db008447ddd9865719bc15b9faff
parent4e429fe7889c5dc35a51dc44d26dabd50d447bd1 (diff)
downloadprofani-tty-20dc44c0a9c30839793234e7ce797976848c4e1b.tar.gz
Fixed broken test
-rw-r--r--tests/test_server_events.c1
-rw-r--r--tests/ui/mock_ui.c11
-rw-r--r--tests/ui/mock_ui.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_server_events.c b/tests/test_server_events.c
index cb8cd21e..f64ce2b4 100644
--- a/tests/test_server_events.c
+++ b/tests/test_server_events.c
@@ -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);
diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c
index 7108df56..17d58c04 100644
--- a/tests/ui/mock_ui.c
+++ b/tests/ui/mock_ui.c
@@ -29,6 +29,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)
 {
     check_expected(contact);
@@ -201,6 +206,12 @@ stub_ui_chat_win_contact_online(void)
 }
 
 void
+stub_ui_roster(void)
+{
+    ui_roster = _stub_ui_roster;
+}
+
+void
 mock_cons_show_error(void)
 {
     cons_show_error = _mock_cons_show_error;
diff --git a/tests/ui/mock_ui.h b/tests/ui/mock_ui.h
index d16fad48..99a460ac 100644
--- a/tests/ui/mock_ui.h
+++ b/tests/ui/mock_ui.h
@@ -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);