]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/core/store.spec.ts
LP1847800 Admin grids support config_field links
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / core / store.spec.ts
1 import {StoreService} from './store.service';
2 import {HatchService} from './hatch.service';
3
4 describe('StoreService', () => {
5     let service: StoreService;
6     let hatchService: HatchService;
7     beforeEach(() => {
8         hatchService = new HatchService();
9         service = new StoreService(null /* CookieService */, hatchService);
10     });
11
12     it('should set/get a localStorage value', () => {
13         const str = 'hello, world';
14         service.setLocalItem('testKey', str);
15         expect(service.getLocalItem('testKey')).toBe(str);
16     });
17
18     it('should set/get a sessionStorage value', () => {
19         const str = 'hello, world again';
20         service.setLocalItem('testKey', str);
21         expect(service.getLocalItem('testKey')).toBe(str);
22     });
23
24 });
25