refactor: asset e2e (#7769)

This commit is contained in:
Jason Rasmussen 2024-03-09 12:51:58 -05:00 committed by GitHub
parent 8eb9dad989
commit 30b0b2474e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 852 additions and 1617 deletions

View file

@ -1,4 +1,4 @@
import { LoginCredentialDto, LoginResponseDto, UserResponseDto } from '@app/domain';
import { LoginResponseDto, UserResponseDto } from '@app/domain';
import { adminSignupStub, loginResponseStub, loginStub } from '@test';
import request from 'supertest';
@ -17,14 +17,6 @@ export const authApi = {
expect(body).toMatchObject({ accessToken: expect.any(String) });
expect(status).toBe(201);
return body as LoginResponseDto;
},
login: async (server: any, dto: LoginCredentialDto) => {
const { status, body } = await request(server).post('/auth/login').send(dto);
expect(status).toEqual(201);
expect(body).toMatchObject({ accessToken: expect.any(String) });
return body as LoginResponseDto;
},
};