cmd_account_shows_account_when_connected_and_no_args

This commit is contained in:
James Booth
2014-12-23 19:51:12 +00:00
parent 5be9ac3243
commit 69fe6c4d21
10 changed files with 73 additions and 14 deletions

View File

@@ -1,6 +1,24 @@
#include "common.h"
#include "config/account.h"
// mock state
static ProfAccount *account = NULL;
void
reset_account_mocks(void)
{
account = NULL;
}
void
mock_accounts_get_account(ProfAccount *given_account)
{
account = given_account;
}
// stubs
void accounts_load(void) {}
void accounts_close(void) {}
@@ -29,7 +47,7 @@ gchar** accounts_get_list(void)
ProfAccount* accounts_get_account(const char * const name)
{
return NULL;
return account;
}
gboolean accounts_enable(const char * const name)

View File

@@ -0,0 +1,2 @@
void reset_account_mocks(void);
void mock_accounts_get_account(ProfAccount *given_account);