Added /otr myfp test

This commit is contained in:
James Booth
2014-02-17 21:52:42 +00:00
parent 6e58d95469
commit 82ad0cd306
8 changed files with 66 additions and 6 deletions

View File

@@ -21,10 +21,10 @@ _mock_otr_libotr_version(void)
return (char *)mock();
}
void
mock_otr_libotr_version(void)
static char *
_mock_otr_get_my_fingerprint(void)
{
otr_libotr_version = _mock_otr_libotr_version;
return (char *)mock();
}
void
@@ -37,5 +37,13 @@ otr_keygen_expect(ProfAccount *account)
void
otr_libotr_version_returns(char *version)
{
otr_libotr_version = _mock_otr_libotr_version;
will_return(_mock_otr_libotr_version, version);
}
void
otr_get_my_fingerprint_returns(char *fingerprint)
{
otr_get_my_fingerprint = _mock_otr_get_my_fingerprint;
will_return(_mock_otr_get_my_fingerprint, fingerprint);
}

View File

@@ -5,7 +5,8 @@
void otr_keygen_expect(ProfAccount *account);
void mock_otr_libotr_version(void);
void otr_libotr_version_returns(char *version);
void otr_get_my_fingerprint_returns(char *fingerprint);
#endif