mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-01-10 04:07:35 +02:00
Fixig backendtext tests #683
This commit is contained in:
parent
015a0221c2
commit
e113062208
@ -4,11 +4,11 @@ export const backendTexts = {
|
||||
sizeToGenerate: {name: 20, description: 22},
|
||||
indexChangesOnly: {name: 30, description: 32},
|
||||
searchQuery: {name: 40, description: 42},
|
||||
sortBy: {name: 100, description: 102},
|
||||
pickAmount: {name: 50, description: 52},
|
||||
emailTo: {name: 60, description: 62},
|
||||
emailFrom: {name: 70, description: 72},
|
||||
emailSubject: {name: 80, description: 82},
|
||||
emailText: {name: 90, description: 92}
|
||||
sortBy: {name: 50, description: 52},
|
||||
pickAmount: {name: 60, description: 62},
|
||||
emailTo: {name: 70, description: 72},
|
||||
emailFrom: {name: 80, description: 82},
|
||||
emailSubject: {name: 90, description: 92},
|
||||
emailText: {name: 100, description: 102}
|
||||
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { BackendtextService } from './backendtext.service';
|
||||
import { backendTexts } from '../../../common/BackendTexts';
|
||||
import {inject, TestBed} from '@angular/core/testing';
|
||||
import {BackendtextService} from './backendtext.service';
|
||||
import {backendTexts} from '../../../common/BackendTexts';
|
||||
|
||||
describe('BackendTextService', () => {
|
||||
beforeEach(() => {
|
||||
@ -9,7 +9,7 @@ describe('BackendTextService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should call UserDTO service login', inject(
|
||||
it('should have valid text for all keys', inject(
|
||||
[BackendtextService],
|
||||
(backendTextService: BackendtextService) => {
|
||||
const getTexts = (obj: any) => {
|
||||
@ -18,7 +18,7 @@ describe('BackendTextService', () => {
|
||||
getTexts(obj[key]);
|
||||
continue;
|
||||
}
|
||||
expect(backendTextService.get(obj[key])).not.toBe(null);
|
||||
expect(backendTextService.get(obj[key])).not.toEqual(null, 'Error for key: ' + obj[key] +', ' + key);
|
||||
}
|
||||
};
|
||||
getTexts(backendTexts);
|
||||
|
@ -17,6 +17,8 @@ export class BackendtextService {
|
||||
return $localize`Only checks indexed files.`;
|
||||
case backendTexts.indexChangesOnly.name:
|
||||
return $localize`Index changes only`;
|
||||
case backendTexts.indexChangesOnly.description:
|
||||
return $localize`Only indexes a folder if it got changed.`;
|
||||
case backendTexts.searchQuery.name:
|
||||
return $localize`Search query`;
|
||||
case backendTexts.searchQuery.description:
|
||||
|
Loading…
Reference in New Issue
Block a user