proxy conf

This commit is contained in:
Bastian Wagner
2024-12-06 14:45:54 +01:00
parent a8f9f111d2
commit 82b02001e4
4 changed files with 75 additions and 4 deletions

View File

@@ -4,8 +4,9 @@ import { HttpService } from '@nestjs/axios';
import { UserRepository } from 'src/model/repositories';
import { ConfigService } from '@nestjs/config';
import { JwtService } from '@nestjs/jwt';
import { MockUserRepository } from '../../../mocks/repositories/user.repository.mock';
describe('AppService', () => {
describe('AuthService', () => {
let service: AuthService;
beforeEach(async () => {
@@ -24,10 +25,15 @@ describe('AppService', () => {
it('should be defined', () => {
expect(service).toBeDefined();
});
it('should store a user on creation', async () => {
const user = await service.register({externalId: '123', username: 'sc'});
expect(service['userRepo'].createUser).toHaveBeenCalled();
expect(user.external.externalId).toEqual('123');
expect(user.username).toEqual('sc');
})
});
class MockUserRepository {
}
class MockHttpService {}