Added a unit test case for collapse directive. 87/56187/5
authorIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>
Wed, 11 Jul 2018 11:36:43 +0000 (17:06 +0530)
committerTakamune Cho <tc012c@att.com>
Mon, 16 Jul 2018 14:34:33 +0000 (14:34 +0000)
Added a unit test case that covers the get collapse() function in
collapse directive.

Issue-ID: APPC-1064
Change-Id: I273cb3a515bae9140fd7807cfa2d11bdee254cfa
Signed-off-by: Arundathi <arundpil@in.ibm.com>
src/app/shared/directives/collapse.component.spec.ts

index 7bb7e26..79b53be 100644 (file)
@@ -2,6 +2,8 @@
 ============LICENSE_START==========================================
 ===================================================================
 Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
 ===================================================================
 
 Unless otherwise specified, all software contained herein is licensed
@@ -48,6 +50,10 @@ describe('CollapseComponent', () => {
             directive.toggle();
         });
 
-
+        it('should return proper expand value collapse method', () => {
+            directive.isExpanded = true;
+            let expandValue = directive.collapse;
+            expect(expandValue).toBe(true);
+        });
     });
-});
\ No newline at end of file
+});