[EOSIO/eos] add testcase for #2195 (security delays) (#2417)

brianjohnson5972 commented on this pull request.

> @@ -923,6 +923,16 @@ BOOST_AUTO_TEST_CASE( link_delay_link_change_test ) { try {
liquid_balance = get_currency_balance(chain, N(tester2));
BOOST_REQUIRE_EQUAL(asset::from_string(«0.0000 CUR»), liquid_balance);

+ try {
+ chain.push_action(config::system_account_name, contracts::linkauth::get_name(), tester_account, fc::mutable_variant_object()
+ («account», «tester»)
+ («code», «currency»)
+ («type», «transfer»)
+ («requirement», «second»),
+ 30, 3);
+ BOOST_FAIL(«linkauth should have a min delay set by previous linkauth»);
+ } catch (…) { }

Use BOOST_REQUIRE_EXCEPTION (with a predicate that identifies the specific exception content, if needed)

Добавить комментарий