mirror of https://github.com/BTCPrivate/copay.git
Fixes: karma tests
This commit is contained in:
parent
85aa5842f1
commit
898e5a12ef
|
@ -2,7 +2,7 @@
|
||||||
var bitcore = require('bitcore');
|
var bitcore = require('bitcore');
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('SendController',
|
angular.module('copayApp.controllers').controller('SendController',
|
||||||
function($scope, $rootScope, $window, $location, $timeout, $anchorScroll, $modal, isMobile, notification) {
|
function($scope, $rootScope, $window, $timeout, $anchorScroll, $modal, isMobile, notification) {
|
||||||
$scope.title = 'Send';
|
$scope.title = 'Send';
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
var satToUnit = 1 / config.unitToSatoshi;
|
var satToUnit = 1 / config.unitToSatoshi;
|
||||||
|
|
|
@ -82,6 +82,7 @@ describe("Unit: Controllers", function() {
|
||||||
|
|
||||||
describe('Address Controller', function() {
|
describe('Address Controller', function() {
|
||||||
var addressCtrl;
|
var addressCtrl;
|
||||||
|
beforeEach(angular.mock.module('copayApp'));
|
||||||
beforeEach(inject(function($controller, $rootScope) {
|
beforeEach(inject(function($controller, $rootScope) {
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
addressCtrl = $controller('AddressesController', {
|
addressCtrl = $controller('AddressesController', {
|
||||||
|
@ -92,13 +93,6 @@ describe("Unit: Controllers", function() {
|
||||||
it('should have a AddressesController controller', function() {
|
it('should have a AddressesController controller', function() {
|
||||||
expect(scope.loading).equal(false);
|
expect(scope.loading).equal(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('selectedAddr should modify scope', function() {
|
|
||||||
expect(scope.selectedAddress).equal(undefined);
|
|
||||||
scope.selectAddress('hola');
|
|
||||||
expect(scope.selectedAddr).equal('hola');
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Transactions Controller', function() {
|
describe('Transactions Controller', function() {
|
||||||
|
@ -342,11 +336,11 @@ describe("Unit: Controllers", function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Signin Controller', function() {
|
describe('Open Controller', function() {
|
||||||
var what;
|
var what;
|
||||||
beforeEach(inject(function($controller, $rootScope) {
|
beforeEach(inject(function($controller, $rootScope) {
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
what = $controller('SigninController', {
|
what = $controller('OpenController', {
|
||||||
$scope: scope,
|
$scope: scope,
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
@ -359,6 +353,20 @@ describe("Unit: Controllers", function() {
|
||||||
scope.open(invalidForm);
|
scope.open(invalidForm);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Join Controller', function() {
|
||||||
|
var what;
|
||||||
|
beforeEach(inject(function($controller, $rootScope) {
|
||||||
|
scope = $rootScope.$new();
|
||||||
|
what = $controller('JoinController', {
|
||||||
|
$scope: scope,
|
||||||
|
});
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should exist', function() {
|
||||||
|
should.exist(what);
|
||||||
|
});
|
||||||
describe('#join', function() {
|
describe('#join', function() {
|
||||||
it('should work with invalid form', function() {
|
it('should work with invalid form', function() {
|
||||||
scope.join(invalidForm);
|
scope.join(invalidForm);
|
||||||
|
|
Loading…
Reference in New Issue