fix tests

This commit is contained in:
Manuel Araoz 2014-07-04 12:51:27 -03:00
commit a30b8d81bb
5 changed files with 43 additions and 16 deletions

View file

@ -36,11 +36,17 @@ describe("Unit: Testing Directives", function() {
form = $scope.form;
}));
it('should validate', function() {
it('should validate with network', function() {
config.networkName = 'testnet';
form.address.$setViewValue('mkfTyEk7tfgV611Z4ESwDDSZwhsZdbMpVy');
expect(form.address.$invalid).to.equal(false);
});
it('should not validate', function() {
it('should not validate with other network', function() {
config.networkName = 'livenet';
form.address.$setViewValue('mkfTyEk7tfgV611Z4ESwDDSZwhsZdbMpVy');
expect(form.address.$invalid).to.equal(true);
});
it('should not validate random', function() {
form.address.$setViewValue('thisisaninvalidaddress');
expect(form.address.$invalid).to.equal(true);
});