Skip to content

Commit

Permalink
N21-1273 test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arnegns committed Oct 11, 2023
1 parent f51d596 commit d312082
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AccountDto } from '@src/modules/account/services/dto';
import { OAuthTokenDto } from '@src/modules/oauth';
import { OAuthService } from '@src/modules/oauth/service/oauth.service';
import { SchoolInMigrationError } from '../errors/school-in-migration.error';
import { ICurrentUser } from '../interface';
import { ICurrentUser, OauthCurrentUser } from '../interface';
import { Oauth2Strategy } from './oauth2.strategy';

describe('Oauth2Strategy', () => {
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('Oauth2Strategy', () => {
body: { code: 'code', redirectUri: 'redirectUri', systemId },
});

expect(result).toEqual<ICurrentUser>({
expect(result).toEqual<OauthCurrentUser>({
systemId,
userId: user.id as EntityId,
roles: [user.roles[0].id],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { OAuthService } from '@src/modules/oauth/service/oauth.service';
import { Strategy } from 'passport-custom';
import { Oauth2AuthorizationBodyParams } from '../controllers/dto';
import { SchoolInMigrationError } from '../errors/school-in-migration.error';
import { ICurrentUser } from '../interface';
import { ICurrentUser, OauthCurrentUser } from '../interface';
import { CurrentUserMapper } from '../mapper';

@Injectable()
Expand Down Expand Up @@ -37,7 +37,7 @@ export class Oauth2Strategy extends PassportStrategy(Strategy, 'oauth2') {
throw new UnauthorizedException('no account found');
}

const currentUser: ICurrentUser = CurrentUserMapper.mapToOauthCurrentUser(
const currentUser: OauthCurrentUser = CurrentUserMapper.mapToOauthCurrentUser(
account.id,
user,
systemId,
Expand Down

0 comments on commit d312082

Please sign in to comment.