add tests
This commit is contained in:
parent
f1257d054c
commit
6b7b00769d
2 changed files with 69 additions and 60 deletions
|
|
@ -147,11 +147,13 @@ describe('PublicKeyRing model', function() {
|
||||||
for (var i = 0; i < 2; i++)
|
for (var i = 0; i < 2; i++)
|
||||||
w.generateAddress(isChange);
|
w.generateAddress(isChange);
|
||||||
|
|
||||||
var as = w.getAddresses();
|
var as = w.getAddressesInfo();
|
||||||
as.length.should.equal(4);
|
as.length.should.equal(4);
|
||||||
for (var j in as) {
|
for (var j in as) {
|
||||||
var a = as[j];
|
var a = as[j];
|
||||||
a.isValid().should.equal(true);
|
a.address.isValid().should.equal(true);
|
||||||
|
a.addressStr.should.equal(a.address.toString());
|
||||||
|
a.isChange.should.equal([false, false, true, true][j]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,14 @@ describe("Unit: controllerUtils", function() {
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should set the rootScope', inject(function(controllerUtils, $rootScope) {
|
||||||
|
controllerUtils.setupRootVariables(function() {
|
||||||
|
expect($rootScope.txAlertCount).to.be.equal(0);
|
||||||
|
expect($rootScope.insightError).to.be.equal(0);
|
||||||
|
expect($rootScope.isCollapsed).to.be.equal(0);
|
||||||
|
expect($rootScope.unitName).to.be.equal('bits');
|
||||||
|
});
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Unit: Notification Service", function() {
|
describe("Unit: Notification Service", function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue