about summary refs log tree commit diff stats
path: root/tests/test_cmd_win.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_cmd_win.c')
-rw-r--r--tests/test_cmd_win.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_cmd_win.c b/tests/test_cmd_win.c
index 0ff109bc..bc19ebf3 100644
--- a/tests/test_cmd_win.c
+++ b/tests/test_cmd_win.c
@@ -6,17 +6,18 @@
 #include <glib.h>
 
 #include "ui/ui.h"
-#include "ui/mock_ui.h"
+#include "ui/stub_ui.h"
 
 #include "command/commands.h"
 
 void cmd_win_shows_message_when_win_doesnt_exist(void **state)
 {
-    mock_cons_show();
     CommandHelp *help = malloc(sizeof(CommandHelp));
     gchar *args[] = { "3", NULL };
 
-    ui_switch_win_expect_and_return(3, FALSE);
+    expect_value(ui_switch_win, i, 3);
+    will_return(ui_switch_win, FALSE);
+
     expect_cons_show("Window 3 does not exist.");
 
     gboolean result = cmd_win(args, *help);
@@ -30,7 +31,8 @@ void cmd_win_switches_to_given_win_when_exists(void **state)
     CommandHelp *help = malloc(sizeof(CommandHelp));
     gchar *args[] = { "12", NULL };
 
-    ui_switch_win_expect_and_return(12, TRUE);
+    expect_value(ui_switch_win, i, 12);
+    will_return(ui_switch_win, TRUE);
 
     gboolean result = cmd_win(args, *help);
     assert_true(result);