refactor lock warning and add tests

This commit is contained in:
Matias Alejo Garcia 2014-08-12 15:26:15 -04:00
commit 35ab711846
13 changed files with 632 additions and 557 deletions

View file

@ -225,15 +225,15 @@ describe("Unit: Controllers", function() {
beforeEach(inject(function($controller, $injector) {
$httpBackend = $injector.get('$httpBackend');
$httpBackend.when('GET', GH)
.respond([{
name: "v100.1.6",
zipball_url: "https://api.github.com/repos/bitpay/copay/zipball/v0.0.6",
tarball_url: "https://api.github.com/repos/bitpay/copay/tarball/v0.0.6",
commit: {
sha: "ead7352bf2eca705de58d8b2f46650691f2bc2c7",
url: "https://api.github.com/repos/bitpay/copay/commits/ead7352bf2eca705de58d8b2f46650691f2bc2c7"
}
}]);
.respond([{
name: "v100.1.6",
zipball_url: "https://api.github.com/repos/bitpay/copay/zipball/v0.0.6",
tarball_url: "https://api.github.com/repos/bitpay/copay/tarball/v0.0.6",
commit: {
sha: "ead7352bf2eca705de58d8b2f46650691f2bc2c7",
url: "https://api.github.com/repos/bitpay/copay/commits/ead7352bf2eca705de58d8b2f46650691f2bc2c7"
}
}]);
}));
var rootScope;
@ -303,11 +303,6 @@ describe("Unit: Controllers", function() {
expect(array.length).equal(n);
});
it('should ignore if wallet is locked', function() {
scope.ignoreLocked();
expect(rootScope.wallet.isLocked).equal(false);
});
});
describe('Send Controller', function() {
@ -428,4 +423,18 @@ describe("Unit: Controllers", function() {
});
});
describe('Warning Controller', function() {
var what;
beforeEach(inject(function($controller, $rootScope) {
scope = $rootScope.$new();
what = $controller('WarningController', {
$scope: scope,
});
}));
it('should exist', function() {
should.exist(what);
});
});
});