proxy conf
This commit is contained in:
@@ -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 {}
|
||||
Reference in New Issue
Block a user