From 43c0a0bb326558f92bf5bc7c1a6825cdea57d288 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Tue, 9 Sep 2014 12:59:48 -0300 Subject: [PATCH] tests for copayers controller --- test/unit/controllers/controllersSpec.js | 25 +++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/test/unit/controllers/controllersSpec.js b/test/unit/controllers/controllersSpec.js index 1c464b236..abd154840 100644 --- a/test/unit/controllers/controllersSpec.js +++ b/test/unit/controllers/controllersSpec.js @@ -40,7 +40,7 @@ describe("Unit: Controllers", function() { }); - describe('Backup Controller', function() { + describe('More Controller', function() { var ctrl; beforeEach(inject(function($controller, $rootScope) { scope = $rootScope.$new(); @@ -479,7 +479,30 @@ describe("Unit: Controllers", function() { }); }); + describe('Copayers Controller', function() { + var saveDownload = null; + var ctrl; + beforeEach(inject(function($controller, $rootScope) { + scope = $rootScope.$new(); + $rootScope.wallet = new FakeWallet(walletConfig); + ctrl = $controller('CopayersController', { + $scope: scope, + $modal: {}, + }); + })); + + it('should exist', function() { + should.exist(ctrl); + }); + + it('Delete Wallet', function() { + expect(scope.wallet).not.equal(undefined); + scope.deleteWallet(); + expect(scope.wallet).equal(undefined); + }); + + }); describe('Join Controller', function() { var what;