diff --git a/test/unit/controllers/controllersSpec.js b/test/unit/controllers/controllersSpec.js index b41524a74..03c6d0c51 100644 --- a/test/unit/controllers/controllersSpec.js +++ b/test/unit/controllers/controllersSpec.js @@ -55,6 +55,23 @@ describe("Unit: Controllers", function() { }); }); + describe('Setup Controller', function() { + var setupCtrl; + beforeEach(inject(function($controller, $rootScope) { + scope = $rootScope.$new(); + setupCtrl = $controller('SetupController', { + $scope: scope, + }); + })); + + it('should return an array of n undefined elements', function() { + var n = 5; + var array = scope.getNumber(n); + expect(array.length).equal(n); + }); + + }); + describe('Address Controller', function() { var addressCtrl; beforeEach(inject(function($controller, $rootScope) { @@ -212,6 +229,13 @@ describe("Unit: Controllers", function() { scope.$apply(); }); + it('should return an array of n undefined elements', function() { + $httpBackend.flush(); // need flush + var n = 5; + var array = scope.getNumber(n); + expect(array.length).equal(n); + }); + }); describe('Send Controller', function() {