Skip to content

Commit

Permalink
Fix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkreuzkam-cap committed Jan 12, 2024
1 parent 452d928 commit 5888500
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions apps/server/src/modules/account/uc/account.uc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ import { AccountService } from '..';
import {
AccountByIdBodyParams,
AccountByIdParams,
AccountResponse,
AccountSearchQueryParams,
AccountSearchType,
} from '../controller/dto';
import { Account } from '../domain';
import { AccountEntityToDoMapper } from '../repo/mapper';
import { AccountValidationService } from '../services/account.validation.service';
import { AccountUc } from './account.uc';
import { ResolvedSearchListAccountDto } from './dto/resolved-account.dto';
import { ResolvedAccountDto, ResolvedSearchListAccountDto } from './dto/resolved-account.dto';

describe('AccountUc', () => {
let module: TestingModule;
Expand Down Expand Up @@ -1061,12 +1060,15 @@ describe('AccountUc', () => {
);
const expected = new ResolvedSearchListAccountDto(
[
new AccountResponse({
new ResolvedAccountDto({
id: mockStudentAccount.id ?? '',
userId: mockStudentAccount.userId?.toString(),
activated: mockStudentAccount.activated,
username: mockStudentAccount.username,
updatedAt: mockStudentAccount.updatedAt,
password: mockStudentAccount.password,
createdAt: mockStudentAccount.createdAt,
systemId: mockStudentAccount.systemId?.toString(),
}),
],
1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('Oauth2Strategy', () => {
userId: user.id as EntityId,
roles: [user.roles[0].id],
schoolId: user.schoolId,
accountId: account.id,
accountId: account.id ?? '',
externalIdToken: idToken,
isExternalUser: true,
});
Expand Down

0 comments on commit 5888500

Please sign in to comment.