Fixes: karma tests

This commit is contained in:
Gustavo Maximiliano Cortez 2014-07-28 13:30:41 -03:00
parent 85aa5842f1
commit 898e5a12ef
2 changed files with 18 additions and 10 deletions

View File

@ -2,7 +2,7 @@
var bitcore = require('bitcore');
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.loading = false;
var satToUnit = 1 / config.unitToSatoshi;

View File

@ -82,6 +82,7 @@ describe("Unit: Controllers", function() {
describe('Address Controller', function() {
var addressCtrl;
beforeEach(angular.mock.module('copayApp'));
beforeEach(inject(function($controller, $rootScope) {
scope = $rootScope.$new();
addressCtrl = $controller('AddressesController', {
@ -92,13 +93,6 @@ describe("Unit: Controllers", function() {
it('should have a AddressesController controller', function() {
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() {
@ -342,11 +336,11 @@ describe("Unit: Controllers", function() {
});
});
describe('Signin Controller', function() {
describe('Open Controller', function() {
var what;
beforeEach(inject(function($controller, $rootScope) {
scope = $rootScope.$new();
what = $controller('SigninController', {
what = $controller('OpenController', {
$scope: scope,
});
}));
@ -359,6 +353,20 @@ describe("Unit: Controllers", function() {
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() {
it('should work with invalid form', function() {
scope.join(invalidForm);