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);
|
||||
};
|
||||
|
||||
$scope.dowloadBackup = function() {
|
||||
$scope.downloadBackup = function() {
|
||||
var w = $rootScope.wallet;
|
||||
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) {
|
||||
var toInt = function(s) {
|
||||
return parseInt(s);
|
||||
|
|
|
@ -44,7 +44,7 @@ describe("Unit: Controllers", function() {
|
|||
it('Backup controller #download', function() {
|
||||
scope.wallet.setEnc('1234567');
|
||||
expect(saveAsLastCall).equal(null);
|
||||
scope.download();
|
||||
scope.downloadBackup();
|
||||
expect(saveAsLastCall.size).equal(7);
|
||||
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 GH = 'https://api.github.com/repos/bitpay/copay/tags';
|
||||
beforeEach(inject(function($controller, $injector) {
|
||||
|
@ -241,7 +241,7 @@ describe("Unit: Controllers", function() {
|
|||
beforeEach(inject(function($controller, $rootScope) {
|
||||
rootScope = $rootScope;
|
||||
scope = $rootScope.$new();
|
||||
headerCtrl = $controller('HeaderController', {
|
||||
headerCtrl = $controller('SidebarController', {
|
||||
$scope: scope,
|
||||
});
|
||||
}));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<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>
|
||||
<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 class="large-8 columns large-centered line-dashed-h"> </div>
|
||||
|
|
Loading…
Reference in New Issue