Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 1
VPD 0
PL 0
Other 0

File Content

/**
import { FooterComponent } from './footer.component';
import { AppSettingsService } from './../app-settings/app-settings.service';
import { AuthenticationService } from './../../auth/auth.service';
import { Observable } from 'rxjs/Observable';

describe('FooterComponent', () => {
let component: FooterComponent;
let appSettingsService: AppSettingsService;
let authenticationService: AuthenticationService;

beforeEach(() => {
authenticationService = new AuthenticationService(null, null, null, null);
appSettingsService = new AppSettingsService(authenticationService, null);

component = new FooterComponent(appSettingsService);
});

it('should be created', () => {
expect(component).toBeTruthy();
});

it('test ngOnInit Method', () => {
const user = { userName:
AI };
const getUserInfoSpy = spyOn(
authenticationService,
'getDecodedUserInfo'
).and.returnValue(user);
const version = {
versionArs: 'V1.0',
versionBackend: 'V2.0',
versionFrontend: 'V 3.0',
versionParser: 'V 4.0'
};
const versionSpy = spyOn(appSettingsService, 'getVersion').and.callFake(
() => {
return new Observable(observer => {
observer.next(version);
});
}
);
component.ngOnInit();
expect(versionSpy).toHaveBeenCalled();
expect(component.version).toEqual(version);
});
});
**/


import { FooterComponent } from './footer.component';
import { version } from '../../../version';

describe('FooterComponent', () => {
let component: FooterComponent;

beforeEach(() => {
component = new FooterComponent();
});

it('should be created', () => {
expect(component).toBeTruthy();
});

it('test ngOnInit Method', () => {
expect(component.prod).toEqual(undefined);

component.ngOnInit();

expect(component.prod).toEqual(version.version);
});

});