Skip to content

Commit 09e6a49

Browse files
committed
Fix: unit tests for session log page
1 parent a08bf21 commit 09e6a49

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/pages/settings/about/session-log/session-log.spec.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2-
3-
import { TestUtils } from '../../../../test';
4-
52
import { ModalMock } from 'ionic-mocks';
6-
import { ActionSheetProvider } from '../../../../providers/action-sheet/action-sheet';
3+
import { TestUtils } from '../../../../test';
74
import { SessionLogPage } from './session-log';
85

96
// Providers
7+
import { ActionSheetProvider } from '../../../../providers/action-sheet/action-sheet';
108
import { PersistenceProvider } from '../../../../providers/persistence/persistence';
119

1210
describe('SessionLogPage', () => {
@@ -123,14 +121,14 @@ describe('SessionLogPage', () => {
123121
});
124122
});
125123
describe('#prepareSessionLogs', () => {
126-
it('should return correct log from persistence provider', () => {
127-
instance.filteredLogs = {
124+
it('should prepare the correct logs of the session', () => {
125+
spyOn(instance.logger, 'get').and.returnValue({
128126
'01/07/2008': {
129127
level: 1,
130128
msg: 'msg',
131129
timestamp: '01/07/2008'
132130
}
133-
};
131+
});
134132

135133
const logs = instance.prepareSessionLogs();
136134
expect(logs).toEqual(

0 commit comments

Comments
 (0)