mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 14:16:21 +00:00
Test /otr theirfp
This commit is contained in:
@@ -27,6 +27,13 @@ _mock_otr_get_my_fingerprint(void)
|
||||
return (char *)mock();
|
||||
}
|
||||
|
||||
static char *
|
||||
_mock_otr_get_their_fingerprint(const char * const recipient)
|
||||
{
|
||||
check_expected(recipient);
|
||||
return (char *)mock();
|
||||
}
|
||||
|
||||
void
|
||||
otr_keygen_expect(ProfAccount *account)
|
||||
{
|
||||
@@ -47,3 +54,11 @@ otr_get_my_fingerprint_returns(char *fingerprint)
|
||||
otr_get_my_fingerprint = _mock_otr_get_my_fingerprint;
|
||||
will_return(_mock_otr_get_my_fingerprint, fingerprint);
|
||||
}
|
||||
|
||||
void
|
||||
otr_get_their_fingerprint_expect_and_return(char *recipient, char *fingerprint)
|
||||
{
|
||||
otr_get_their_fingerprint = _mock_otr_get_their_fingerprint;
|
||||
expect_string(_mock_otr_get_their_fingerprint, recipient, recipient);
|
||||
will_return(_mock_otr_get_their_fingerprint, fingerprint);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,6 @@ void otr_keygen_expect(ProfAccount *account);
|
||||
void otr_libotr_version_returns(char *version);
|
||||
|
||||
void otr_get_my_fingerprint_returns(char *fingerprint);
|
||||
void otr_get_their_fingerprint_expect_and_return(char *recipient, char *fingerprint);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user