bugs fixed

This commit is contained in:
Daniel Herrero 2017-11-15 13:05:11 +01:00
parent 44dde2b705
commit d5d8145fee
2 changed files with 6 additions and 7 deletions

View File

@ -46,7 +46,6 @@ export default class Controller {
this.$http.post(`/mailer/manuscript/payment-update/${this.client.id}`).then(
() => {
this.vnApp.showMessage(this.translate.instant('Notification sent!'));
this.checkEtChanges();
}
);
}

View File

@ -3,17 +3,17 @@ import './search-panel.js';
describe('Client', () => {
describe('Component vnClientSearchPanel', () => {
let $componentController;
let $window;
let sessionStorage;
let controller;
beforeEach(() => {
angular.mock.module('client');
});
beforeEach(angular.mock.inject((_$componentController_, _$window_) => {
beforeEach(angular.mock.inject((_$componentController_, _sessionStorage_) => {
$componentController = _$componentController_;
$window = _$window_;
controller = $componentController('vnClientSearchPanel', {$window: $window});
sessionStorage = _sessionStorage_;
controller = $componentController('vnClientSearchPanel', {sessionStorage: sessionStorage});
}));
describe('onSearch()', () => {
@ -31,10 +31,10 @@ describe('Client', () => {
describe('$onChanges()', () => {
it('should set filter properties using the search values', () => {
expect(controller.filter).not.toBeDefined();
spyOn(JSON, 'parse').and.returnValue({data: 'data'});
spyOn(sessionStorage, 'get').and.returnValue({data: 'data'});
controller.$onChanges();
expect(controller.filter).toBe(JSON.parse({data: 'data'}));
expect(controller.filter).toBe(sessionStorage.get({data: 'data'}));
});
});
});