mirror of https://github.com/BTCPrivate/copay.git
Test for getNumber function.
This commit is contained in:
parent
4f1fbf59df
commit
ac83477a88
|
@ -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() {
|
describe('Address Controller', function() {
|
||||||
var addressCtrl;
|
var addressCtrl;
|
||||||
beforeEach(inject(function($controller, $rootScope) {
|
beforeEach(inject(function($controller, $rootScope) {
|
||||||
|
@ -212,6 +229,13 @@ describe("Unit: Controllers", function() {
|
||||||
scope.$apply();
|
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() {
|
describe('Send Controller', function() {
|
||||||
|
|
Loading…
Reference in New Issue