Test burning of whitelisted asset
This commit is contained in:
parent
639930a2d7
commit
c1d1884d0b
1 changed files with 7 additions and 0 deletions
|
|
@ -133,6 +133,9 @@ BOOST_AUTO_TEST_CASE( transfer_whitelist_uia )
|
|||
trx.operations.back() = op;
|
||||
//Fail because nathan is blacklisted
|
||||
BOOST_REQUIRE_THROW(PUSH_TX( db, trx, ~0 ), fc::exception);
|
||||
trx.operations = {asset_burn_operation{asset(), nathan.id, advanced.amount(10)}};
|
||||
//Fail because nathan is blacklisted
|
||||
BOOST_REQUIRE_THROW(PUSH_TX( db, trx, ~0 ), fc::exception);
|
||||
std::swap(op.from, op.to);
|
||||
trx.operations.back() = op;
|
||||
//Fail because nathan is blacklisted
|
||||
|
|
@ -181,6 +184,10 @@ BOOST_AUTO_TEST_CASE( transfer_whitelist_uia )
|
|||
//Fail because nathan is not whitelisted
|
||||
BOOST_CHECK(!nathan.is_authorized_asset(advanced));
|
||||
BOOST_REQUIRE_THROW(PUSH_TX( db, trx, ~0 ), fc::exception);
|
||||
|
||||
trx.operations = {asset_burn_operation{asset(), dan.id, advanced.amount(10)}};
|
||||
PUSH_TX(db, trx, ~0);
|
||||
BOOST_CHECK_EQUAL(get_balance(dan, advanced), 40);
|
||||
} catch(fc::exception& e) {
|
||||
edump((e.to_detail_string()));
|
||||
throw;
|
||||
|
|
|
|||
Loading…
Reference in a new issue