diff options
author | James Booth <boothj5@gmail.com> | 2014-03-16 01:23:12 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-03-16 01:23:12 +0000 |
commit | 93397e4581e1c294972c4b262deb65f6d1a0d9d0 (patch) | |
tree | d09e536ceef7e428451c8064a815e6ffd14e2d28 /tests/ui | |
parent | 05952e8337a947b30fd196520c185d38ae1b03c0 (diff) | |
download | profani-tty-93397e4581e1c294972c4b262deb65f6d1a0d9d0.tar.gz |
Added cmd_roster test
Diffstat (limited to 'tests/ui')
-rw-r--r-- | tests/ui/mock_ui.c | 18 | ||||
-rw-r--r-- | tests/ui/mock_ui.h | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c index 5cf48cb9..cbdbd486 100644 --- a/tests/ui/mock_ui.c +++ b/tests/ui/mock_ui.c @@ -171,6 +171,12 @@ void _mock_ui_room_join(char *room) check_expected(room); } +static +void _mock_cons_show_roster(GSList *list) +{ + check_expected(list); +} + // bind mocks and stubs void @@ -276,6 +282,12 @@ mock_ui_current_print_line(void) ui_current_print_line = _mock_ui_current_print_line; } +void +mock_cons_show_roster(void) +{ + cons_show_roster = _mock_cons_show_roster; +} + // expectations void @@ -420,3 +432,9 @@ ui_room_join_expect(char *room) ui_room_join = _mock_ui_room_join; expect_string(_mock_ui_room_join, room, room); } + +void +cons_show_roster_expect(GSList *list) +{ + expect_any(_mock_cons_show_roster, list); +} diff --git a/tests/ui/mock_ui.h b/tests/ui/mock_ui.h index 05b271c1..fa56e2f6 100644 --- a/tests/ui/mock_ui.h +++ b/tests/ui/mock_ui.h @@ -61,4 +61,7 @@ void ui_current_win_is_otr_returns(gboolean result); void ui_room_join_expect(char *room); +void mock_cons_show_roster(void); +void cons_show_roster_expect(GSList *list); + #endif |