summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts9
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts2
2 files changed, 4 insertions, 7 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
index bd9bea48..4b3e1c7c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
@@ -47,7 +47,6 @@ import { LayoutModule } from '../../layout.module';
import { CookieService } from 'ngx-cookie-service';
import { HeaderService } from 'src/app/shared/services/header/header.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { Router } from '@angular/router';
import 'rxjs/add/observable/of';
import { Observable } from 'rxjs/Observable';
@@ -55,11 +54,8 @@ import { Observable } from 'rxjs/Observable';
describe('HeaderComponent', () => {
let headerService:HeaderService;
- let cookieService:CookieService;
- let router:Router;
let component: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>;
- let spy: any;
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -83,7 +79,6 @@ describe('HeaderComponent', () => {
component = fixture.componentInstance;
fixture.detectChanges();
headerService = TestBed.get(HeaderService);
- cookieService=TestBed.get(CookieService);
});
@@ -96,6 +91,10 @@ describe('HeaderComponent', () => {
let spy=spyOn(headerService, 'getTopMenuItems').and.returnValue(Observable.of('you object'));
component.ngOnInit();
expect(spy).toHaveBeenCalled();
+ expect(component.userFirstName).toEqual(component.response.firstName);
+ expect(component.userEmail).toEqual(component.response.email);
+ expect(component.userId).toEqual(component.response.userid);
+ expect(component.userName).toEqual(component.userName);
})
})
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
index 7bf5c649..1e447c72 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
@@ -38,8 +38,6 @@
import { Component, OnInit } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import { HeaderService } from '../../../shared/services/header/header.service';
-import { UserService } from 'src/app/shared/services/user/user.service';
-import { User } from 'src/app/shared/services/user/user';
import { CookieService } from 'ngx-cookie-service';
@Component({