FrontendConfig: Fix unit test

Emulate the behaviour of the new app config: If renderOrigin is undefined instead use domain.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-04-27 23:33:13 +02:00 committed by David Mehren
parent 662d428e3c
commit 1edc0d87c5
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -21,6 +21,7 @@ import { Loglevel } from '../config/loglevel.enum';
*/
describe('FrontendConfigService', () => {
const domain = 'http://md.example.com';
const emptyAuthConfig: AuthConfig = {
email: {
enableLogin: false,
@ -183,8 +184,8 @@ describe('FrontendConfigService', () => {
]) {
it(`combination #${index} works`, async () => {
const appConfig: AppConfig = {
domain: 'http://md.example.com',
rendererOrigin: renderOrigin,
domain: domain,
rendererOrigin: renderOrigin ?? domain,
port: 3000,
loglevel: Loglevel.ERROR,
forbiddenNoteIds: [],