mirror of
https://github.com/monero-project/monero.git
synced 2025-05-05 11:44:59 -04:00
Wallet::refresh + tests
This commit is contained in:
parent
1ae9cdc6bf
commit
830c19c934
3 changed files with 28 additions and 0 deletions
|
@ -71,10 +71,13 @@ struct WalletManagerTest : public testing::Test
|
|||
const char * WALLET_PASS2 = "password22";
|
||||
const char * WALLET_LANG = "English";
|
||||
|
||||
|
||||
// TODO: add test wallets to the source tree (as they have some balance mined)?
|
||||
const char * TESTNET_WALLET_NAME = "/home/mbg033/dev/monero/testnet/wallet_01.bin";
|
||||
const char * TESTNET_WALLET_PASS = "";
|
||||
|
||||
const char * TESTNET_DAEMON_ADDRESS = "localhost:38081";
|
||||
|
||||
WalletManagerTest()
|
||||
{
|
||||
std::cout << __FUNCTION__ << std::endl;
|
||||
|
@ -249,6 +252,15 @@ TEST_F(WalletManagerTest, WalletShowsBalance)
|
|||
ASSERT_TRUE(wmgr->closeWallet(wallet2));
|
||||
}
|
||||
|
||||
TEST_F(WalletManagerTest, WalletRefresh)
|
||||
{
|
||||
Bitmonero::Wallet * wallet1 = wmgr->openWallet(TESTNET_WALLET_NAME, TESTNET_WALLET_PASS, true);
|
||||
// make sure testnet daemon is running
|
||||
ASSERT_TRUE(wallet1->init(TESTNET_DAEMON_ADDRESS, 0));
|
||||
ASSERT_TRUE(wallet1->refresh());
|
||||
ASSERT_TRUE(wmgr->closeWallet(wallet1));
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue