From 64a371743c0eb9fdf2b6e2318ee10e180ca29960 Mon Sep 17 00:00:00 2001 From: gladcow Date: Tue, 15 Oct 2019 17:16:16 +0300 Subject: [PATCH] test changes in get_global_properties() result --- tests/cli/son.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/cli/son.cpp b/tests/cli/son.cpp index 1fb355fb..f7a0d64e 100644 --- a/tests/cli/son.cpp +++ b/tests/cli/son.cpp @@ -1175,6 +1175,29 @@ BOOST_AUTO_TEST_CASE( list_son ) BOOST_TEST_MESSAGE("SON Vote cli wallet tests end"); } + +BOOST_AUTO_TEST_CASE( related_functions ) +{ + BOOST_TEST_MESSAGE("SON-related functions cli wallet tests begin"); + try + { + global_property_object gpo = con.wallet_api_ptr->get_global_properties(); + BOOST_CHECK(gpo.active_sons.size() == 0); + + INVOKE(create_sons); + + gpo = con.wallet_api_ptr->get_global_properties(); + BOOST_CHECK(gpo.active_sons.size() == 2); + + } catch( fc::exception& e ) { + BOOST_TEST_MESSAGE("SON cli wallet tests exception"); + edump((e.to_detail_string())); + throw; + } + BOOST_TEST_MESSAGE("SON-related functions cli wallet tests end"); +} + + BOOST_AUTO_TEST_SUITE_END()