diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cmd_join.c | 8 | ||||
-rw-r--r-- | tests/ui/mock_ui.c | 6 | ||||
-rw-r--r-- | tests/ui/mock_ui.h | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/tests/test_cmd_join.c b/tests/test_cmd_join.c index d07cd5f0..b23515ba 100644 --- a/tests/test_cmd_join.c +++ b/tests/test_cmd_join.c @@ -109,7 +109,7 @@ void cmd_join_uses_account_mucservice_when_no_service_specified(void **state) mock_presence_join_room(); presence_join_room_expect(expected_room, nick, NULL); - ui_room_join_expect(expected_room); + ui_room_join_expect(expected_room, TRUE); gboolean result = cmd_join(args, *help); assert_true(result); @@ -136,7 +136,7 @@ void cmd_join_uses_supplied_nick(void **state) mock_presence_join_room(); presence_join_room_expect(room, nick, NULL); - ui_room_join_expect(room); + ui_room_join_expect(room, TRUE); gboolean result = cmd_join(args, *help); assert_true(result); @@ -163,7 +163,7 @@ void cmd_join_uses_account_nick_when_not_supplied(void **state) mock_presence_join_room(); presence_join_room_expect(room, account_nick, NULL); - ui_room_join_expect(room); + ui_room_join_expect(room, TRUE); gboolean result = cmd_join(args, *help); assert_true(result); @@ -193,7 +193,7 @@ void cmd_join_uses_password_when_supplied(void **state) mock_presence_join_room(); presence_join_room_expect(expected_room, account_nick, password); - ui_room_join_expect(expected_room); + ui_room_join_expect(expected_room, TRUE); gboolean result = cmd_join(args, *help); assert_true(result); diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c index 94f8e3c3..16e66436 100644 --- a/tests/ui/mock_ui.c +++ b/tests/ui/mock_ui.c @@ -166,9 +166,10 @@ gboolean _mock_ui_current_win_is_otr(void) } static -void _mock_ui_room_join(char *room) +void _mock_ui_room_join(char *room, gboolean focus) { check_expected(room); + check_expected(focus); } static @@ -433,10 +434,11 @@ ui_current_win_is_otr_returns(gboolean result) } void -ui_room_join_expect(char *room) +ui_room_join_expect(char *room, gboolean focus) { ui_room_join = _mock_ui_room_join; expect_string(_mock_ui_room_join, room, room); + expect_value(_mock_ui_room_join, focus, focus); } void diff --git a/tests/ui/mock_ui.h b/tests/ui/mock_ui.h index 5b984615..d16fad48 100644 --- a/tests/ui/mock_ui.h +++ b/tests/ui/mock_ui.h @@ -59,7 +59,7 @@ void ui_current_print_line_expect(char *message); void ui_current_win_is_otr_returns(gboolean result); -void ui_room_join_expect(char *room); +void ui_room_join_expect(char *room, gboolean focus); void mock_cons_show_roster(void); void cons_show_roster_expect(GSList *list); |