about summary refs log tree commit diff stats
path: root/tests/config
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-12-24 13:06:32 +0000
committerJames Booth <boothj5@gmail.com>2014-12-24 13:06:32 +0000
commit05bf9bb9932e0ce7caeb1b44fc5403474dfaf9e1 (patch)
tree01283a870ddfd1c43e666d209ed372125ca6667d /tests/config
parent8c01021ab9ae719c398e6c4a3e87ab98a5d6ac0e (diff)
downloadprofani-tty-05bf9bb9932e0ce7caeb1b44fc5403474dfaf9e1.tar.gz
Refactoring cmd_account tests
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/stub_accounts.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/config/stub_accounts.c b/tests/config/stub_accounts.c
index fe76f40c..78f0c44e 100644
--- a/tests/config/stub_accounts.c
+++ b/tests/config/stub_accounts.c
@@ -21,7 +21,14 @@ char * accounts_find_enabled(char *prefix)
 
 void accounts_reset_all_search(void) {}
 void accounts_reset_enabled_search(void) {}
-void accounts_add(const char *jid, const char *altdomain, const int port) {}
+
+void accounts_add(const char *jid, const char *altdomain, const int port)
+{
+    check_expected(jid);
+    check_expected(altdomain);
+    check_expected(port);
+}
+
 int  accounts_remove(const char *jid)
 {
     return 0;
@@ -29,7 +36,7 @@ int  accounts_remove(const char *jid)
 
 gchar** accounts_get_list(void)
 {
-    return NULL;
+    return (gchar **)mock();
 }
 
 ProfAccount* accounts_get_account(const char * const name)
@@ -39,7 +46,8 @@ ProfAccount* accounts_get_account(const char * const name)
 
 gboolean accounts_enable(const char * const name)
 {
-    return FALSE;
+    check_expected(name);
+    return (gboolean)mock();
 }
 
 gboolean accounts_disable(const char * const name)