Improve test coverage

This commit is contained in:
wltsmrz
2013-09-12 14:15:34 -07:00
parent bba2e10e94
commit 9eeb3faba3
2 changed files with 56 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ Currency.prototype.equals = function (d) {
// this._value = NaN on error.
Currency.prototype.parse_json = function (j) {
if (j instanceof Currency) {
this._value = j;
j.copyTo(this);
} else if (typeof j === 'string') {
if (j === "" || j === "0" || j === "XRP") {
// XRP is never allowed as a Currency object