summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-01-23 19:34:57 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-01-23 19:47:14 +0530
commit5a8a2bd7041489f13b5e8f6145963d0df83b5969 (patch)
treed06aac7cf00a8bbf12fe278222860ddc52ce520e /ecomp-sdk/epsdk-app-overlay
parent8e61d9596e629d540a34a0f1cf3ed096ef52e4a1 (diff)
Write one Angular test case
Written Angular test case for PORTALSDK/sdkOS/ngApp User Service Issue-ID: PORTAL-808 Change-Id: Ie4a06dfa48a19ec95757b76251d3fa81104e42e2 Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts25
1 files changed, 21 insertions, 4 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts
index d6d659b9..e1af3d4c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts
@@ -1,15 +1,32 @@
-import { TestBed } from '@angular/core/testing';
+import { TestBed, async } from '@angular/core/testing';
import { HttpClientModule } from '@angular/common/http';
import { UserService } from './user.service';
+import { User } from './user';
describe('UserService', () => {
- beforeEach(() => TestBed.configureTestingModule({
- imports:[HttpClientModule]
- }));
+
+ let service: UserService ;
+ let dummyUser: User;
+
+ beforeEach( () =>
+ TestBed.configureTestingModule({
+ imports:[HttpClientModule],
+ providers: [UserService],
+ }),
+ );
it('should be created', () => {
const service: UserService = TestBed.get(UserService);
expect(service).toBeTruthy();
});
+
+ it('should test getFunctionalMenuStaticDetailSession2', () =>{
+
+ let response: Object = service.getFunctionalMenuStaticDetailSession2();
+ expect(response).toEqual(User);
+
+ });
+
+
});