diff options
author | Ilya Kitaev <mbg033@gmail.com> | 2016-03-31 16:38:57 +0300 |
---|---|---|
committer | Ilya Kitaev <mbg033@gmail.com> | 2016-03-31 16:38:57 +0300 |
commit | 830c19c934f1c621cf8f268772d5ab92f35d75b3 (patch) | |
tree | ad1e603ce35b064d9559a96846f1898ac924ed7c /tests/libwallet_api_tests | |
parent | "testnet" is default parameter (diff) | |
download | monero-830c19c934f1c621cf8f268772d5ab92f35d75b3.tar.xz |
Wallet::refresh + tests
Diffstat (limited to 'tests/libwallet_api_tests')
-rw-r--r-- | tests/libwallet_api_tests/main.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/libwallet_api_tests/main.cpp b/tests/libwallet_api_tests/main.cpp index d5bdc8d67..d935a38b7 100644 --- a/tests/libwallet_api_tests/main.cpp +++ b/tests/libwallet_api_tests/main.cpp @@ -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) { |