more codecov (hopefully)

This commit is contained in:
Mayukha Vadari
2026-05-27 17:25:41 -04:00
parent ff0ddad2bb
commit 7e82565162
3 changed files with 28 additions and 0 deletions

View File

@@ -72,6 +72,27 @@ public:
env(regkey(alice, alice), Ter(temBAD_REGKEY));
}
void
testNoAlternativeKey()
{
using namespace test::jtx;
testcase("Cannot remove last signing method");
Env env{*this, testableAmendments()};
Account const alice("alice");
Account const bob("bob");
env.fund(XRP(10000), alice);
env(regkey(alice, bob));
env(fset(alice, asfDisableMaster), Sig(alice));
env(regkey(alice, kDisabled), Sig(bob), Ter(tecNO_ALTERNATIVE_KEY));
auto const sle = env.le(alice);
BEAST_EXPECT(
sle && sle->isFlag(lsfDisableMaster) && sle->getAccountID(sfRegularKey) == bob.id());
}
void
testPasswordSpent()
{
@@ -169,6 +190,7 @@ public:
{
testDisabledMasterKey();
testDisabledRegularKey();
testNoAlternativeKey();
testPasswordSpent();
testUniversalMask();
testTicketRegularKey();