mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 02:16:22 +00:00
Moved error handling logic to server_events
This commit is contained in:
@@ -92,6 +92,12 @@ char * _stub_ui_ask_password(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static
|
||||
void _mock_ui_handle_error(const char * const err_msg)
|
||||
{
|
||||
check_expected(err_msg);
|
||||
}
|
||||
|
||||
static
|
||||
void _stub_ui_chat_win_contact_online(PContact contact, Resource *resource, GDateTime *last_activity)
|
||||
{
|
||||
@@ -159,6 +165,12 @@ stub_cons_show(void)
|
||||
cons_show = _stub_cons_show;
|
||||
}
|
||||
|
||||
void
|
||||
mock_ui_handle_error(void)
|
||||
{
|
||||
ui_handle_error = _mock_ui_handle_error;
|
||||
}
|
||||
|
||||
void
|
||||
expect_cons_show(char *output)
|
||||
{
|
||||
@@ -213,3 +225,9 @@ mock_ui_ask_password_returns(char *password)
|
||||
{
|
||||
will_return(_mock_ui_ask_password, strdup(password));
|
||||
}
|
||||
|
||||
void
|
||||
expect_ui_handle_error(char *err_msg)
|
||||
{
|
||||
expect_string(_mock_ui_handle_error, err_msg, err_msg);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ void stub_ui_chat_win_contact_online(void);
|
||||
void mock_cons_show_error(void);
|
||||
void expect_cons_show_error(char *output);
|
||||
|
||||
void mock_ui_handle_error(void);
|
||||
void expect_ui_handle_error(char *err_msg);
|
||||
|
||||
void mock_cons_show_account(void);
|
||||
void expect_cons_show_account(ProfAccount *account);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user