diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cmd_connect.c | 4 | ||||
-rw-r--r-- | tests/ui/mock_ui.c | 11 | ||||
-rw-r--r-- | tests/ui/mock_ui.h | 4 |
3 files changed, 4 insertions, 15 deletions
diff --git a/tests/test_cmd_connect.c b/tests/test_cmd_connect.c index 76493115..33f49164 100644 --- a/tests/test_cmd_connect.c +++ b/tests/test_cmd_connect.c @@ -19,11 +19,13 @@ static void test_with_connection_status(jabber_conn_status_t status) { - stub_ui_already_connected(); + mock_cons_show(); CommandHelp *help = malloc(sizeof(CommandHelp)); mock_connection_status(status); + expect_cons_show("You are either connected already, or a login is in process."); + gboolean result = cmd_connect(NULL, *help); assert_true(result); diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c index 0e01be25..94f8e3c3 100644 --- a/tests/ui/mock_ui.c +++ b/tests/ui/mock_ui.c @@ -83,11 +83,6 @@ char * _stub_ui_ask_password(void) } static -void _stub_ui_already_connected(void) -{ -} - -static win_type_t _mock_ui_current_win_type(void) { return (win_type_t)mock(); @@ -264,12 +259,6 @@ stub_cons_show(void) } void -stub_ui_already_connected(void) -{ - ui_already_connected = _stub_ui_already_connected; -} - -void stub_ui_handle_recipient_not_found(void) { ui_handle_recipient_not_found = _stub_ui_handle_recipient_not_found; diff --git a/tests/ui/mock_ui.h b/tests/ui/mock_ui.h index 70c9f3b3..5b984615 100644 --- a/tests/ui/mock_ui.h +++ b/tests/ui/mock_ui.h @@ -66,6 +66,4 @@ void cons_show_roster_expect(GSList *list); void ui_switch_win_expect_and_return(int given_i, gboolean result); -void stub_ui_already_connected(void); - -#endif \ No newline at end of file +#endif |