mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 22:45:52 +00:00
UT: Test offer counts.
This commit is contained in:
@@ -15,6 +15,7 @@ buster.testRunner.timeout = 5000;
|
||||
|
||||
buster.testCase("Offer tests", {
|
||||
'setUp' : testutils.build_setup(),
|
||||
// 'setUp' : testutils.build_setup({ verbose: true }),
|
||||
'tearDown' : testutils.build_teardown(),
|
||||
|
||||
"offer create then cancel in one ledger" :
|
||||
@@ -344,6 +345,11 @@ buster.testCase("Offer tests", {
|
||||
|
||||
testutils.create_accounts(self.remote, "root", "10000.0", ["alice", "bob", "mtgox"], callback);
|
||||
},
|
||||
function (callback) {
|
||||
self.what = "Owner count undefined.";
|
||||
|
||||
testutils.verify_owner_count(self.remote, "bob", undefined, callback);
|
||||
},
|
||||
function (callback) {
|
||||
self.what = "Set limits.";
|
||||
|
||||
@@ -354,6 +360,16 @@ buster.testCase("Offer tests", {
|
||||
},
|
||||
callback);
|
||||
},
|
||||
function (callback) {
|
||||
self.what = "Owner counts after trust.";
|
||||
|
||||
testutils.verify_owner_counts(self.remote,
|
||||
{
|
||||
"alice" : 1,
|
||||
"bob" : 1,
|
||||
},
|
||||
callback);
|
||||
},
|
||||
function (callback) {
|
||||
self.what = "Distribute funds.";
|
||||
|
||||
@@ -376,6 +392,16 @@ buster.testCase("Offer tests", {
|
||||
})
|
||||
.submit();
|
||||
},
|
||||
function (callback) {
|
||||
self.what = "Owner counts after offer create.";
|
||||
|
||||
testutils.verify_owner_counts(self.remote,
|
||||
{
|
||||
"alice" : 1,
|
||||
"bob" : 2,
|
||||
},
|
||||
callback);
|
||||
},
|
||||
function (callback) {
|
||||
self.what = "Verify offer balance.";
|
||||
|
||||
@@ -409,6 +435,16 @@ buster.testCase("Offer tests", {
|
||||
|
||||
testutils.verify_offer_not_found(self.remote, "bob", seq, callback);
|
||||
},
|
||||
function (callback) {
|
||||
self.what = "Owner counts after consumed.";
|
||||
|
||||
testutils.verify_owner_counts(self.remote,
|
||||
{
|
||||
"alice" : 1,
|
||||
"bob" : 1,
|
||||
},
|
||||
callback);
|
||||
},
|
||||
], function (error) {
|
||||
buster.refute(error, self.what);
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user