refactor(author): lazy-load relations

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-11-16 18:45:40 +01:00
parent de6d75238c
commit 5d7b544e1f
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
4 changed files with 10 additions and 10 deletions

View file

@ -703,7 +703,7 @@ describe('NotesService', () => {
it('works', async () => {
const user = User.create('hardcoded', 'Testy') as User;
const author = Author.create(1);
author.user = user;
author.user = Promise.resolve(user);
const group = Group.create('testGroup', 'testGroup', false) as Group;
const content = 'testContent';
jest
@ -798,7 +798,7 @@ describe('NotesService', () => {
it('works', async () => {
const user = User.create('hardcoded', 'Testy') as User;
const author = Author.create(1);
author.user = user;
author.user = Promise.resolve(user);
const otherUser = User.create('other hardcoded', 'Testy2') as User;
otherUser.username = 'other hardcoded user';
const group = Group.create('testGroup', 'testGroup', false) as Group;