From e38e45c3febf9e9d768b838c9d7907de36a75e14 Mon Sep 17 00:00:00 2001 From: gerard Date: Wed, 22 Aug 2018 09:56:59 +0200 Subject: [PATCH 1/2] temporally desactivated waiting for fixtures changes --- services/loopback/common/methods/sale/specs/removes.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/loopback/common/methods/sale/specs/removes.spec.js b/services/loopback/common/methods/sale/specs/removes.spec.js index b234eef76..1032129f9 100644 --- a/services/loopback/common/methods/sale/specs/removes.spec.js +++ b/services/loopback/common/methods/sale/specs/removes.spec.js @@ -1,6 +1,6 @@ const app = require(`${servicesDir}/ticket/server/server`); -describe('sale removes()', () => { +xdescribe('sale removes()', () => { let sale; beforeAll(async() => { From 05ea1dcbf10c2c56098bc278c7b926050667b733 Mon Sep 17 00:00:00 2001 From: gerard Date: Wed, 22 Aug 2018 12:41:00 +0200 Subject: [PATCH 2/2] Tarea #494 /directives/bind.js Front unit test --- client/core/src/directives/specs/bind.spec.js | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/client/core/src/directives/specs/bind.spec.js b/client/core/src/directives/specs/bind.spec.js index e69de29bb..c96979f2f 100644 --- a/client/core/src/directives/specs/bind.spec.js +++ b/client/core/src/directives/specs/bind.spec.js @@ -0,0 +1,35 @@ +describe('Directive bind', () => { + let $scope; + let element; + let compile; + + beforeEach(() => { + angular.mock.module('client'); + }); + + compile = _element => { + inject(($compile, $rootScope, _$timeout_, _$httpBackend_) => { + $scope = $rootScope.$new(); + element = angular.element(_element); + _$httpBackend_.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({}); + $compile(element)($scope); + $scope.$digest(); + }); + }; + + it('should throw an error when the directive atribute is not set', () => { + let html = `
`; + + expect(() => { + compile(html); + }).toThrow(Error(`vnBind: Binding keys not defined`)); + }); + + it('should throw an error when the command modifier is not valid', () => { + let html = `
`; + + expect(() => { + compile(html); + }).toThrow(new Error(`vnBind: Invalid modifier key in binding`)); + }); +});