UT: Fix payment test.

This commit is contained in:
Arthur Britto
2012-12-11 21:23:56 -08:00
parent 33d6508237
commit 4752c9ff4e
3 changed files with 7 additions and 5 deletions

View File

@@ -692,7 +692,7 @@ Json::Value PathState::getJson() const
jvPathState["out_pass"] = saOutPass.getJson(0);
if (uQuality)
jvPathState["uQuality"] = Json::Value::UInt(uQuality);
jvPathState["uQuality"] = boost::str(boost::format("%d") % uQuality);
return jvPathState;
}

View File

@@ -1451,6 +1451,7 @@ Transaction.prototype._account_secret = function (account) {
// .message_key() NYI
// .transfer_rate()
// .wallet_locator() NYI
// .wallet_size() NYI
Transaction.prototype.account_set = function (src) {
this._secret = this._account_secret(src);
this.tx_json.TransactionType = 'AccountSet';

View File

@@ -224,7 +224,7 @@ buster.testCase("Basic Path finding", {
buster.testCase("Extended Path finding", {
// 'setUp' : testutils.build_setup({ verbose: true, no_server: true }),
'setUp' : testutils.build_setup({ verbose: true }),
// 'setUp' : testutils.build_setup({ verbose: true }),
// 'setUp' : testutils.build_setup(),
'tearDown' : testutils.build_teardown(),
@@ -360,7 +360,7 @@ buster.testCase("Extended Path finding", {
});
},
"=>alternative paths - consume best transfer first" :
"alternative paths - consume best transfer first" :
function (done) {
var self = this;
@@ -408,6 +408,7 @@ buster.testCase("Extended Path finding", {
self.remote.transaction()
.payment('alice', 'bob', "77/USD/bob")
.build_path(true)
.send_max("100/USD/alice")
.once('proposed', function (m) {
// console.log("proposed: %s", JSON.stringify(m));
callback(m.result !== 'tesSUCCESS');
@@ -419,9 +420,9 @@ buster.testCase("Extended Path finding", {
testutils.verify_balances(self.remote,
{
"alice" : [ "0/USD/mtgox", "63.63636363636363/USD/bitstamp" ],
"alice" : [ "0/USD/mtgox", "62.3/USD/bitstamp" ],
"bob" : [ "70/USD/mtgox", "7/USD/bitstamp" ],
"bitstamp" : [ "-63.63636363636363/USD/alice", "-7/USD/bob" ],
"bitstamp" : [ "-62.3/USD/alice", "-7/USD/bob" ],
"mtgox" : [ "0/USD/alice", "-70/USD/bob" ],
},
callback);