summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts
index 21423380..1c883519 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/dashboard/dashboard.component.spec.ts
@@ -4,6 +4,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DashboardComponent } from './dashboard.component';
import { DashboardModule } from './dashboard.module';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
describe('DashboardComponent', () => {
let component: DashboardComponent;
@@ -15,6 +16,7 @@ describe('DashboardComponent', () => {
DashboardModule,
RouterTestingModule,
BrowserAnimationsModule,
+ HttpClientTestingModule
]
})
.compileComponents();
@@ -29,4 +31,11 @@ describe('DashboardComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});
+
+ it('should test the closeAlert method', () =>{
+ component.alerts=[1,2,3,4,5];
+ component.closeAlert(2);
+ expect(component.alerts).toEqual([1,3,4,5]);
+ })
+
});