From afa4f6532f3e1b333758110eb6feaaa9cc0f6b08 Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Wed, 13 Dec 2017 14:14:44 +0100 Subject: [PATCH] corregido test de datePicker --- client/core/src/datePicker/datePicker.js | 5 ++--- client/core/src/datePicker/datePicker.spec.js | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index 936eae2db..7f1f05c16 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -18,14 +18,13 @@ export const formatEquivalence = { }; class DatePicker extends Component { - constructor($element, $translate, $filter, $timeout, $attrs, $scope) { + constructor($element, $translate, $filter, $timeout, $attrs) { super($element); this.input = $element[0].querySelector('input'); this.$translate = $translate; this.$filter = $filter; this.$timeout = $timeout; this.$attrs = $attrs; - this.$scope = $scope; this.enabled = true; this._modelView = null; @@ -202,7 +201,7 @@ class DatePicker extends Component { this.destroyPicker(); } } -DatePicker.$inject = ['$element', '$translate', '$filter', '$timeout', '$attrs', '$scope']; +DatePicker.$inject = ['$element', '$translate', '$filter', '$timeout', '$attrs']; module.component('vnDatePicker', { template: require('./datePicker.html'), diff --git a/client/core/src/datePicker/datePicker.spec.js b/client/core/src/datePicker/datePicker.spec.js index bd0807dd7..4f2adc7cf 100644 --- a/client/core/src/datePicker/datePicker.spec.js +++ b/client/core/src/datePicker/datePicker.spec.js @@ -5,6 +5,7 @@ describe('Component vnDatePicker', () => { let $scope; let $timeout; let $element; + let $attrs; let $translate; let controller; @@ -18,7 +19,8 @@ describe('Component vnDatePicker', () => { $timeout = _$timeout_; $element = angular.element(`
`); $translate = _$translate_; - controller = $componentController('vnDatePicker', {$scope, $element, $translate, $timeout}); + $attrs = {}; + controller = $componentController('vnDatePicker', {$scope, $element, $translate, $timeout, $attrs}); })); describe('_formatFlat2Angular()', () => {