Browse Source

Add test coverage for RPC call z_getnewaddress.

pull/145/head
Simon 8 years ago
parent
commit
badb9a9c2f
  1. 7
      src/test/rpc_wallet_tests.cpp

7
src/test/rpc_wallet_tests.cpp

@ -421,6 +421,13 @@ BOOST_AUTO_TEST_CASE(rpc_wallet_z_importexport)
// Verify the two sets of addresses are the same
BOOST_CHECK(listaddrs.size() == numAddrs);
BOOST_CHECK(myaddrs == listaddrs);
// Add one more address
BOOST_CHECK_NO_THROW(retValue = CallRPC("z_getnewaddress"));
std::string newaddress = retValue.get_str();
CZCPaymentAddress pa(newaddress);
auto newAddr = pa.Get();
BOOST_CHECK(pwalletMain->HaveSpendingKey(newAddr));
}

Loading…
Cancel
Save