From 701f6c9c2e89f2a090d831fc491e2a9be4cd1685 Mon Sep 17 00:00:00 2001 From: Luigi Date: Tue, 23 Apr 2019 17:57:18 -0300 Subject: [PATCH] Arreglo npm test --- spec/controllerSpec.js | 46 ++++++++++++++++++++++++++++++++++++++++++++-- src/js/controller.js | 3 +-- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/spec/controllerSpec.js b/spec/controllerSpec.js index c6f3475..ebc42cd 100644 --- a/spec/controllerSpec.js +++ b/spec/controllerSpec.js @@ -325,6 +325,11 @@ describe('Controladores abm vehículo', function() { $watch: function() {} }, focaAbmVehiculoService: { + getCisternas: function() { + return { + then: function() { return; } + }; + }, getVehiculo: function() { return { then: function() { return; } @@ -359,6 +364,12 @@ describe('Controladores abm vehículo', function() { $watch: function() {} }; var focaAbmVehiculoService = { + + getCisternas: function() { + return { + then: function() { return; } + }; + }, getVehiculo: function() { return { then: function() { return; } @@ -403,6 +414,13 @@ describe('Controladores abm vehículo', function() { $watch: function() {} }; var focaAbmVehiculoService = { + + getCisternas: function() { + return { + then: function() { return; } + }; + }, + getVehiculo: function() { return { then: function() { return; } @@ -452,6 +470,11 @@ describe('Controladores abm vehículo', function() { var controller = $controller('focaAbmVehiculoController', { $scope: scope, focaAbmVehiculoService: { + getCisternas: function() { + return { + then: function() { return; } + }; + }, getVehiculo: function() { return { then: function() { return; } @@ -493,6 +516,11 @@ describe('Controladores abm vehículo', function() { var controller = $controller('focaAbmVehiculoController', { $scope: scope, focaAbmVehiculoService: { + getCisternas: function() { + return { + then: function() { return; } + }; + }, getVehiculo: function() { return { then: function() { return; } @@ -536,6 +564,11 @@ describe('Controladores abm vehículo', function() { var controller = $controller('focaAbmVehiculoController', { $scope: scope, focaAbmVehiculoService: { + getCisternas: function() { + return { + then: function() { return; } + }; + }, getVehiculo: function() { return { then: function() { return; } @@ -581,6 +614,11 @@ describe('Controladores abm vehículo', function() { var controller = $controller('focaAbmVehiculoController', { $scope: scope, focaAbmVehiculoService: { + getCisternas: function() { + return { + then: function() { return; } + }; + }, getVehiculo: function() { return { then: function() { return; } @@ -602,7 +640,7 @@ describe('Controladores abm vehículo', function() { addCustomButton: function() { return; } }, $localStorage: {}, - $window: {} + $window: {}, }); //act @@ -628,7 +666,11 @@ describe('Controladores abm vehículo', function() { then: function() { return; } }; }, - getCisternas: function() { return; }, + getCisternas: function() { + return { + then: function() { return; } + }; + }, deleteCisterna: function() { return; } }; var controller = $controller('focaAbmVehiculoController', { diff --git a/src/js/controller.js b/src/js/controller.js index 198903f..2f8a1f3 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -101,7 +101,6 @@ angular.module('focaAbmVehiculo') $scope.now = new Date(); $scope.focused = 1; $scope.creando = false; - $scope.editando = false; $scope.transportistaStamp = ''; $scope.cisternas = []; $scope.cisterna = { @@ -206,7 +205,7 @@ angular.module('focaAbmVehiculo') }; $scope.guardar = function(key) { - + key = (typeof key === 'undefined') ? 13 : key; if (key === 13) { -- 1.9.1