Merge branch 'dev' of http://git.verdnatura.es/salix into dev

This commit is contained in:
Carlos Jimenez 2018-08-22 12:55:23 +02:00
commit b20ecc307b
2 changed files with 36 additions and 1 deletions

View File

@ -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 = `<div id="test" vn-bind=""></div>`;
expect(() => {
compile(html);
}).toThrow(Error(`vnBind: Binding keys not defined`));
});
it('should throw an error when the command modifier is not valid', () => {
let html = `<div id="test" vn-bind="manzana +"></div>`;
expect(() => {
compile(html);
}).toThrow(new Error(`vnBind: Invalid modifier key in binding`));
});
});

View File

@ -1,6 +1,6 @@
const app = require(`${servicesDir}/ticket/server/server`);
describe('sale removes()', () => {
xdescribe('sale removes()', () => {
let sale;
beforeAll(async() => {