crud model test

This commit is contained in:
Bernat Exposito Domenech 2020-02-26 07:32:28 +01:00
parent f900b7ef62
commit 0f19247f17
1 changed files with 8 additions and 14 deletions

View File

@ -73,17 +73,6 @@ describe('Component vnCrudModel', () => {
}); });
}); });
describe('autoRefresh()', () => {
it('', () => {
// spyOn(controller, 'autoRefresh');
// spyOn(controller, 'clear');
// controller.url = '/TestUrl';
// expect(controller.url).toEqual('/TestUrl');
});
});
describe('buildFilter()', () => { describe('buildFilter()', () => {
it('should build a filter and return it', () => { it('should build a filter and return it', () => {
controller.order = 'id ASC'; controller.order = 'id ASC';
@ -226,13 +215,18 @@ describe('Component vnCrudModel', () => {
}); });
}); });
xdescribe('onRemoteError()', () => { describe('onRemoteError()', () => {
it('should check the error', () => { it('should check the error', () => {
spyOn(controller, 'onRequestEnd'); spyOn(controller, 'onRequestEnd');
controller.onRemoteError(); let error;
try {
controller.onRemoteError('TestError');
} catch (e) {
error = e.message;
}
// expect(controller.url).toEqual('/TestUrl'); expect(error).toBe('errasdor');
}); });
}); });
}); });