chore(server): remove unused code (#9670)

This commit is contained in:
Jason Rasmussen
2024-05-22 15:53:57 -04:00
committed by GitHub
parent 8f37784eae
commit 967d195a05
2 changed files with 1 additions and 32 deletions
+1 -17
View File
@@ -1,6 +1,6 @@
import { plainToInstance } from 'class-transformer';
import { validate } from 'class-validator';
import { CreateAdminDto, CreateUserDto, CreateUserOAuthDto, UpdateUserDto } from 'src/dtos/user.dto';
import { CreateUserDto, CreateUserOAuthDto, UpdateUserDto } from 'src/dtos/user.dto';
describe('update user DTO', () => {
it('should allow emails without a tld', async () => {
@@ -52,22 +52,6 @@ describe('create user DTO', () => {
});
});
describe('create admin DTO', () => {
it('should allow emails without a tld', async () => {
const someEmail = 'test@test';
const dto = plainToInstance(CreateAdminDto, {
isAdmin: true,
email: someEmail,
password: 'some password',
name: 'some name',
});
const errors = await validate(dto);
expect(errors).toHaveLength(0);
expect(dto.email).toEqual(someEmail);
});
});
describe('create user oauth DTO', () => {
it('should allow emails without a tld', async () => {
const someEmail = 'test@test';