aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-09-12 16:38:03 +0530
committerTakamune Cho <tc012c@att.com>2018-09-16 11:15:29 +0000
commit8bee05ce9dc7c038041afa97fa74fd831fc7c4f0 (patch)
treea21758ff50ee5d2229ac57ef66fd81ed13687d63
parent701623e7ca5a243febb08a55488e4cecce8dc73d (diff)
aboutus.component: Added test case
Wrote test case to test tlPlus and tlMinus functions to call setTraceVl function of utility service based on the trace value stored in local storage. Issue-ID: APPC-1064 Change-Id: Ie93e48bb6ee6df35bbd175e15fda56060ac3c539 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r--src/app/about-us/aboutus.component.spec.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/app/about-us/aboutus.component.spec.ts b/src/app/about-us/aboutus.component.spec.ts
index 4df0316..29f9784 100644
--- a/src/app/about-us/aboutus.component.spec.ts
+++ b/src/app/about-us/aboutus.component.spec.ts
@@ -107,4 +107,18 @@ describe('ContacUsComponent', () => {
component.tlMinus();
expect(spy1).toHaveBeenCalled();
}));
+
+ it('should test tlPlus function to call setTracelvl ', inject([UtilityService], (utilService: UtilityService) => {
+ let spy1 = spyOn(UtilityService.prototype, 'setTracelvl');
+ component.tlPlus();
+ expect(spy1).toHaveBeenCalled();
+ }));
+
+ it('should test tlMinus function to call setTracelvl', inject([UtilityService], (utilService: UtilityService) => {
+ let spy1 = spyOn(UtilityService.prototype, 'setTracelvl');
+ let trv = 4;
+ localStorage["Tracelvl"] = trv;
+ component.tlMinus();
+ expect(spy1).toHaveBeenCalled();
+ }));
});