mirror of https://github.com/BTCPrivate/copay.git
Fixes karma tests
This commit is contained in:
parent
0a027360a8
commit
91c7ab100d
|
@ -9,7 +9,7 @@ angular.module('copayApp.controllers').controller('BackupController',
|
||||||
backupService.download(w);
|
backupService.download(w);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.dowloadBackup = function() {
|
$scope.downloadBackup = function() {
|
||||||
var w = $rootScope.wallet;
|
var w = $rootScope.wallet;
|
||||||
backupService.download(w);
|
backupService.download(w);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,11 @@ angular.module('copayApp.controllers').controller('SidebarController',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ng-repeat defined number of times instead of repeating over array?
|
||||||
|
$scope.getNumber = function(num) {
|
||||||
|
return new Array(num);
|
||||||
|
}
|
||||||
|
|
||||||
$http.get('https://api.github.com/repos/bitpay/copay/tags').success(function(data) {
|
$http.get('https://api.github.com/repos/bitpay/copay/tags').success(function(data) {
|
||||||
var toInt = function(s) {
|
var toInt = function(s) {
|
||||||
return parseInt(s);
|
return parseInt(s);
|
||||||
|
|
|
@ -44,7 +44,7 @@ describe("Unit: Controllers", function() {
|
||||||
it('Backup controller #download', function() {
|
it('Backup controller #download', function() {
|
||||||
scope.wallet.setEnc('1234567');
|
scope.wallet.setEnc('1234567');
|
||||||
expect(saveAsLastCall).equal(null);
|
expect(saveAsLastCall).equal(null);
|
||||||
scope.download();
|
scope.downloadBackup();
|
||||||
expect(saveAsLastCall.size).equal(7);
|
expect(saveAsLastCall.size).equal(7);
|
||||||
expect(saveAsLastCall.type).equal('text/plain;charset=utf-8');
|
expect(saveAsLastCall.type).equal('text/plain;charset=utf-8');
|
||||||
});
|
});
|
||||||
|
@ -220,7 +220,7 @@ describe("Unit: Controllers", function() {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Unit: Header Controller", function() {
|
describe("Unit: Sidebar Controller", function() {
|
||||||
var scope, $httpBackendOut;
|
var scope, $httpBackendOut;
|
||||||
var GH = 'https://api.github.com/repos/bitpay/copay/tags';
|
var GH = 'https://api.github.com/repos/bitpay/copay/tags';
|
||||||
beforeEach(inject(function($controller, $injector) {
|
beforeEach(inject(function($controller, $injector) {
|
||||||
|
@ -241,7 +241,7 @@ describe("Unit: Controllers", function() {
|
||||||
beforeEach(inject(function($controller, $rootScope) {
|
beforeEach(inject(function($controller, $rootScope) {
|
||||||
rootScope = $rootScope;
|
rootScope = $rootScope;
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
headerCtrl = $controller('HeaderController', {
|
headerCtrl = $controller('SidebarController', {
|
||||||
$scope: scope,
|
$scope: scope,
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<h4 class="large-12 columns"><i class="fi-download m10r"></i> Backup </h4>
|
<h4 class="large-12 columns"><i class="fi-download m10r"></i> Backup </h4>
|
||||||
<p class="large-8 columns text-gray"> Its important to back up your wallet so that you can recover your wallet in case of disaster </p>
|
<p class="large-8 columns text-gray"> Its important to back up your wallet so that you can recover your wallet in case of disaster </p>
|
||||||
<div class="large-4 columns">
|
<div class="large-4 columns">
|
||||||
<a class="button radius secondary expand" ng-click="dowloadBackup()">Download File</a>
|
<a class="button radius secondary expand" ng-click="downloadBackup()">Download File</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="large-8 columns large-centered line-dashed-h"> </div>
|
<div class="large-8 columns large-centered line-dashed-h"> </div>
|
||||||
|
|
Loading…
Reference in New Issue