JS: Fix and another unit-test.

This commit is contained in:
Arthur Britto
2012-11-23 18:50:20 -08:00
committed by Stefan Thomas
parent 135fe39db4
commit e40d8b7b6f
2 changed files with 5 additions and 1 deletions

View File

@@ -249,7 +249,7 @@ Currency.from_json = function (j) {
: j.clone();
};
currency.is_valid = function (j) {
Currency.is_valid = function (j) {
return currency.from_json(j).is_valid();
};

View File

@@ -38,6 +38,10 @@ buster.testCase("Amount", {
"is_valid('rrrrrrrrrrrrrrrrrrrrrhoLvTp')" : function () {
buster.assert(UInt160.is_valid("rrrrrrrrrrrrrrrrrrrrrhoLvTp"));
},
"!is_valid('rrrrrrrrrrrrrrrrrrrrrhoLvT')" : function () {
buster.refute(UInt160.is_valid("rrrrrrrrrrrrrrrrrrrrrhoLvT"));
},
},
"Amount parsing" : {