mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 23:06:21 +00:00
Test /otr start sends OTR query message to current recipient
This commit is contained in:
@@ -81,6 +81,13 @@ _mock_bookmark_remove(const char *jid, gboolean autojoin)
|
||||
return (gboolean)mock();
|
||||
}
|
||||
|
||||
static void
|
||||
_mock_message_send(const char * const msg, const char * const recipient)
|
||||
{
|
||||
check_expected(msg);
|
||||
check_expected(recipient);
|
||||
}
|
||||
|
||||
void
|
||||
mock_jabber_connect_with_details(void)
|
||||
{
|
||||
@@ -219,3 +226,11 @@ expect_and_return_bookmark_remove(char *expected_jid, gboolean expected_autojoin
|
||||
|
||||
will_return(_mock_bookmark_remove, removed);
|
||||
}
|
||||
|
||||
void
|
||||
message_send_expect(char *message, char *recipient)
|
||||
{
|
||||
message_send = _mock_message_send;
|
||||
expect_string(_mock_message_send, msg, message);
|
||||
expect_string(_mock_message_send, recipient, recipient);
|
||||
}
|
||||
|
||||
@@ -31,4 +31,6 @@ void mock_bookmark_remove(void);
|
||||
void expect_and_return_bookmark_remove(char *expected_jid, gboolean expected_autojoin,
|
||||
gboolean removed);
|
||||
|
||||
void message_send_expect(char *message, char *recipient);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user