Skip to content

Commit 4e535f1

Browse files
committed
Add testDeletePermissionedDomainOwner()
1 parent 1e01cd3 commit 4e535f1

File tree

1 file changed

+41
-12
lines changed

1 file changed

+41
-12
lines changed

src/test/app/AccountDelete_test.cpp

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
//==============================================================================
1919

2020
#include <test/jtx.h>
21+
#include <test/jtx/permissioned_domains.h>
2122

2223
#include <xrpl/protocol/Feature.h>
24+
#include <xrpl/protocol/TER.h>
2325
#include <xrpl/protocol/jss.h>
2426

2527
namespace ripple {
@@ -1251,21 +1253,48 @@ class AccountDelete_test : public beast::unit_test::suite
12511253
}
12521254
}
12531255

1256+
void
1257+
testDeletePermissionedDomainOwner()
1258+
{
1259+
using namespace jtx;
1260+
1261+
Env env{*this};
1262+
Account alice{"alice"};
1263+
Account becky{"becky"};
1264+
env.fund(XRP(1000), alice, becky);
1265+
env.close();
1266+
env(fset(becky, asfDepositAuth));
1267+
env.close();
1268+
1269+
pdomain::Credentials const credentials1{
1270+
{.issuer = alice, .credType = "foobaz"}};
1271+
1272+
env(pdomain::setTx(alice, credentials1));
1273+
// Close 256 ledgers
1274+
for (int i = 0; i < 256; ++i)
1275+
env.close();
1276+
1277+
auto const acctDelFee{drops(env.current()->fees().increment)};
1278+
env(acctdelete(alice, becky), fee(acctDelFee), ter{tecNO_PERMISSION});
1279+
env.close();
1280+
}
1281+
12541282
void
12551283
run() override
12561284
{
1257-
testBasics();
1258-
testDirectories();
1259-
testOwnedTypes();
1260-
testResurrection();
1261-
testAmendmentEnable();
1262-
testTooManyOffers();
1263-
testImplicitlyCreatedTrustline();
1264-
testBalanceTooSmallForFee();
1265-
testWithTickets();
1266-
testDest();
1267-
testDestinationDepositAuthCredentials();
1268-
testDeleteCredentialsOwner();
1285+
// testBasics();
1286+
// testDirectories();
1287+
// testOwnedTypes();
1288+
// testResurrection();
1289+
// testAmendmentEnable();
1290+
// testTooManyOffers();
1291+
// testImplicitlyCreatedTrustline();
1292+
// testBalanceTooSmallForFee();
1293+
// testWithTickets();
1294+
// testDest();
1295+
// testDestinationDepositAuthCredentials();
1296+
// testDeleteCredentialsOwner();
1297+
testDeletePermissionedDomainOwner();
12691298
}
12701299
};
12711300

0 commit comments

Comments
 (0)