Commit df35410a authored by Phil Hughes's avatar Phil Hughes

fixed karma spec

parent 337a73e1
...@@ -12,12 +12,21 @@ FREQUENT_PROJECTS.MAX_COUNT = 3; ...@@ -12,12 +12,21 @@ FREQUENT_PROJECTS.MAX_COUNT = 3;
describe('ProjectsService', () => { describe('ProjectsService', () => {
let service; let service;
let originalGon;
beforeEach(() => { beforeEach(() => {
gon.api_version = currentSession.apiVersion; originalGon = window.gon;
window.gon = Object.assign({}, {
api_version: currentSession.apiVersion,
});
service = new ProjectsService(currentSession.username); service = new ProjectsService(currentSession.username);
}); });
afterEach(() => {
window.gon = originalGon;
});
describe('contructor', () => { describe('contructor', () => {
it('should initialize default properties of class', () => { it('should initialize default properties of class', () => {
expect(service.isLocalStorageAvailable).toBeTruthy(); expect(service.isLocalStorageAvailable).toBeTruthy();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment