Fix tests for AppComponent

This commit is contained in:
ziajka 2018-04-09 09:19:35 +02:00
parent 2e0eae5602
commit 9c2f8eeda6
2 changed files with 2 additions and 3 deletions

View File

@ -59,8 +59,8 @@ describe('AppComponent', () => {
component.ngOnInit();
settingsService.set('crash_reports', false);
expect(spy.send).toHaveBeenCalled();
expect(spy.send.calls.first().args[0]).toEqual('settings.changed');
expect(spy.send.calls.first().args[1].crash_reports).toEqual(false);
expect(spy.send.calls.mostRecent().args[0]).toEqual('settings.changed');
expect(spy.send.calls.mostRecent().args[1].crash_reports).toEqual(false);
}));
it('should receive changed settings and do not forward to electron', async(() => {

View File

@ -25,7 +25,6 @@ export class AppComponent implements OnInit {
ngOnInit(): void {
if (this.electronService.isElectronApp) {
this.settingsService.subscribe((settings) => {
console.log("settings changed on angular");
this.electronService.ipcRenderer.send('settings.changed', settings);
});
}