bugs fixed
This commit is contained in:
parent
44dde2b705
commit
d5d8145fee
|
@ -46,7 +46,6 @@ export default class Controller {
|
||||||
this.$http.post(`/mailer/manuscript/payment-update/${this.client.id}`).then(
|
this.$http.post(`/mailer/manuscript/payment-update/${this.client.id}`).then(
|
||||||
() => {
|
() => {
|
||||||
this.vnApp.showMessage(this.translate.instant('Notification sent!'));
|
this.vnApp.showMessage(this.translate.instant('Notification sent!'));
|
||||||
this.checkEtChanges();
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,17 @@ import './search-panel.js';
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientSearchPanel', () => {
|
describe('Component vnClientSearchPanel', () => {
|
||||||
let $componentController;
|
let $componentController;
|
||||||
let $window;
|
let sessionStorage;
|
||||||
let controller;
|
let controller;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
angular.mock.module('client');
|
angular.mock.module('client');
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(angular.mock.inject((_$componentController_, _$window_) => {
|
beforeEach(angular.mock.inject((_$componentController_, _sessionStorage_) => {
|
||||||
$componentController = _$componentController_;
|
$componentController = _$componentController_;
|
||||||
$window = _$window_;
|
sessionStorage = _sessionStorage_;
|
||||||
controller = $componentController('vnClientSearchPanel', {$window: $window});
|
controller = $componentController('vnClientSearchPanel', {sessionStorage: sessionStorage});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('onSearch()', () => {
|
describe('onSearch()', () => {
|
||||||
|
@ -31,10 +31,10 @@ describe('Client', () => {
|
||||||
describe('$onChanges()', () => {
|
describe('$onChanges()', () => {
|
||||||
it('should set filter properties using the search values', () => {
|
it('should set filter properties using the search values', () => {
|
||||||
expect(controller.filter).not.toBeDefined();
|
expect(controller.filter).not.toBeDefined();
|
||||||
spyOn(JSON, 'parse').and.returnValue({data: 'data'});
|
spyOn(sessionStorage, 'get').and.returnValue({data: 'data'});
|
||||||
controller.$onChanges();
|
controller.$onChanges();
|
||||||
|
|
||||||
expect(controller.filter).toBe(JSON.parse({data: 'data'}));
|
expect(controller.filter).toBe(sessionStorage.get({data: 'data'}));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue