Skip to content

Commit

Permalink
[fold] add account delete test
Browse files Browse the repository at this point in the history
  • Loading branch information
dangell7 committed Dec 2, 2024
1 parent ffc5938 commit 43546f7
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/test/app/AccountDelete_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,34 @@ class AccountDelete_test : public beast::unit_test::suite
jv[sfOfferSequence.jsonName] = seq;
return jv;
};

bool const withFeatureTokenEscrow =
env.current()->rules().enabled(featureTokenEscrow);
if (withFeatureTokenEscrow)
{
Account const carol("carol");
auto const USD = gw["USD"];
env.fund(XRP(100000), carol);
env(fset(gw, asfAllowTokenLocking));
env.close();
env.trust(USD(10000), carol);
env.close();
env(pay(gw, carol, USD(100)));
env.close();

std::uint32_t const escrowSeq{env.seq(carol)};
env(escrowCreate(carol, becky, USD(1), env.now() + 2s));
env.close();

env(acctdelete(gw, becky),
fee(acctDelFee),
ter(tecHAS_OBLIGATIONS));
env.close();

env(escrowCancel(becky, carol, escrowSeq));
env.close();
}

env(escrowCancel(becky, alice, escrowSeq));
env.close();

Expand Down

0 comments on commit 43546f7

Please sign in to comment.