Fix unit tests

This commit is contained in:
Denys Vuika
2016-04-20 11:11:33 +01:00
parent f448c279a6
commit 786678be80

View File

@@ -1,8 +1,8 @@
import {it, inject, injectAsync, describe, beforeEachProviders, TestComponentBuilder} from 'angular2/testing'; import {it, describe} from 'angular2/testing';
import {provide, Injector} from 'angular2/core'; import {provide, Injector} from 'angular2/core';
import {Http, HTTP_PROVIDERS, XHRBackend, Response, ResponseOptions} from 'angular2/http'; import {Http, HTTP_PROVIDERS, XHRBackend, Response, ResponseOptions} from 'angular2/http';
import {MockBackend} from 'angular2/http/testing'; import {MockBackend} from 'angular2/http/testing';
import {Authentication} from 'app/services/authentication'; import {Authentication} from './authentication';
describe('Authentication', () => { describe('Authentication', () => {
let injector, let injector,
@@ -74,7 +74,7 @@ describe('Authentication', () => {
it('should return false and token undefined on log out', () => { it('should return false and token undefined on log out', () => {
service.token = 'fake-token'; service.token = 'fake-token';
localStorage.setItem('token','fake-token'); localStorage.setItem('token', 'fake-token');
service.logout() service.logout()
.subscribe( () => { .subscribe( () => {
expect(service.isLoggedIn()).toBe(false); expect(service.isLoggedIn()).toBe(false);