// authService.spec.js

describe('authService', function () {
    var http,
        authService,
        configService,
        rootScope;

    beforeEach(function () {
        angular.mock.module('lighthouse.app');
        angular.mock.inject(function (_$httpBackend_, _$rootScope_, _authService_, _configService_) {
            http = _$httpBackend_;
            authService = _authService_;
            configService = _configService_;
            rootScope = _$rootScope_;
        });
    });

    it('should use the right login URL', function () {
        http.expect('POST',
            configService.api.base + '/login').respond('');

        authService.login({});
        http.flush();
    });

    it('should use the right logout URL', function () {
        http.expect('GET',
            configService.api.base + '/logout').respond('');

        authService.logout();
        http.flush();
    });

    it('should determine status', function () {
        expect(authService.isLoggedIn()).toBe(false);

        rootScope.user = {'email': 'test@test.com'};
        expect(authService.isLoggedIn()).toBe(true);
    });
});
@@ -834,32 +834,87 @@
 ).respond('');%0A%0A
+        // mock log in%0A        rootScope.user = true;%0A%0A
         authServ
@@ -1090,34 +1090,12 @@
 r = 
-%7B'email': 'test@test.com'%7D
+true
 ;%0A  

fix unit test