about summary refs log tree commit diff stats
path: root/tests/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-12-20 18:39:39 +0000
committerJames Booth <boothj5@gmail.com>2014-12-20 18:39:39 +0000
commit6800bf1cad19d3ec99a3c8333be5fae81a24954d (patch)
treec086feaef444b1665825c14c49d077af1e62ae83 /tests/ui
parentea267e2017c8e941166754d50180fdfbca85eefe (diff)
downloadprofani-tty-6800bf1cad19d3ec99a3c8333be5fae81a24954d.tar.gz
Fixed tests
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/mock_ui.c13
-rw-r--r--tests/ui/mock_ui.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c
index 2f4b407e..e2327388 100644
--- a/tests/ui/mock_ui.c
+++ b/tests/ui/mock_ui.c
@@ -94,6 +94,12 @@ win_type_t _mock_ui_current_win_type(void)
 }
 
 static
+ProfChatWin * _mock_ui_get_current_chat(void)
+{
+    return (ProfChatWin*)mock();
+}
+
+static
 void _mock_ui_handle_error(const char * const err_msg)
 {
     check_expected(err_msg);
@@ -395,6 +401,13 @@ mock_current_win_type(win_type_t type)
 }
 
 void
+mock_ui_get_current_chat(ProfChatWin *chatwin)
+{
+    ui_get_current_chat = _mock_ui_get_current_chat;
+    will_return(_mock_ui_get_current_chat, chatwin);
+}
+
+void
 ui_current_print_formatted_line_expect(char show_char, int attrs, char *message)
 {
     expect_value(_mock_ui_current_print_formatted_line, show_char, show_char);
diff --git a/tests/ui/mock_ui.h b/tests/ui/mock_ui.h
index 7214ca52..e68ba6dc 100644
--- a/tests/ui/mock_ui.h
+++ b/tests/ui/mock_ui.h
@@ -47,6 +47,8 @@ void mock_ui_ask_password_returns(char *password);
 
 void mock_current_win_type(win_type_t type);
 
+void mock_ui_get_current_chat(ProfChatWin *chatwin);
+
 void mock_ui_current_recipient(void);
 void ui_current_recipient_returns(char *jid);