summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts
index d2ad4c4..07ccc39 100644
--- a/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts
+++ b/src/app/vnfs/build-artifacts/reference-dataform/reference-dataform.util.spec.ts
@@ -29,7 +29,7 @@ import { NotificationsService } from 'angular2-notifications';
import { UtilityService } from '../../../shared/services/utilityService/utility.service';
import { HttpUtilService } from '../../../shared/services/httpUtil/http-util.service';
-fdescribe('ReferenceDataFormUtil', () => {
+describe('ReferenceDataFormUtil', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientModule],
@@ -47,4 +47,12 @@ fdescribe('ReferenceDataFormUtil', () => {
it('should ...', inject([ReferenceDataFormUtil], (service: ReferenceDataFormUtil) => {
expect(service).toBeTruthy();
}));
+
+ it('should test checkResult function when status is 401', inject([ReferenceDataFormUtil], (service: ReferenceDataFormUtil) => {
+ let spy = spyOn(NotificationsService.prototype, 'info');
+ let result = {output: {status: { code: '401'}}};
+ let returnValue = service.checkResult(result);
+ expect(spy).toHaveBeenCalled();
+ expect(returnValue).toBe(false);
+ }));
});