Fixes: tests. Added karma and mocha tests.

This commit is contained in:
Gustavo Maximiliano Cortez 2014-08-07 20:07:41 -03:00
commit 8ad1fa7b02
7 changed files with 40 additions and 9 deletions

View file

@ -288,8 +288,10 @@ describe("Unit: Controllers", function() {
describe("Unit: Sidebar Controller", function() {
var rootScope;
beforeEach(inject(function($controller, $rootScope) {
rootScope = $rootScope;
scope = $rootScope.$new();
rootScope = $rootScope;
rootScope.wallet = new FakeWallet(config);
headerCtrl = $controller('SidebarController', {
$scope: scope,
});
@ -301,6 +303,11 @@ 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() {