1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/src/frontend/app/model/backendtext.service.spec.ts
2021-04-17 20:06:17 +02:00

31 lines
789 B
TypeScript

import {inject, TestBed} from '@angular/core/testing';
import {BackendtextService} from './backendtext.service';
import {backendTexts} from '../../../common/BackendTexts';
describe('BackendTextService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
BackendtextService
]
});
});
it('should call UserDTO service login', inject([BackendtextService],
(backendTextService: BackendtextService) => {
const getTexts = (obj: any) => {
for (const key of Object.keys(obj)) {
if (typeof obj[key] === 'object') {
getTexts(obj[key]);
continue;
}
expect(backendTextService.get(obj[key])).not.toBe(null);
}
};
getTexts(backendTexts);
}));
});