test(server): auth e2e (#3492)

* test(server): auth controller e2e test

* test(server): user e2e test

* refactor(server): album e2e

* fix: linting
This commit is contained in:
Jason Rasmussen 2023-08-01 11:49:50 -04:00 committed by GitHub
parent 9e085c1071
commit e53625b067
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 927 additions and 496 deletions

View file

@ -1,5 +1,27 @@
import { AuthUserDto } from '@app/domain';
export const signupStub = {
firstName: 'Immich',
lastName: 'Admin',
email: 'admin@immich.app',
password: 'Password123',
};
export const signupResponseStub = {
id: expect.any(String),
email: 'admin@immich.app',
firstName: 'Immich',
lastName: 'Admin',
createdAt: expect.any(String),
};
export const loginStub = {
admin: {
email: 'admin@immich.app',
password: 'Password123',
},
};
export const authStub = {
admin: Object.freeze<AuthUserDto>({
id: 'admin_id',
@ -76,6 +98,18 @@ export const authStub = {
};
export const loginResponseStub = {
admin: {
response: {
accessToken: expect.any(String),
firstName: 'Immich',
isAdmin: true,
lastName: 'Admin',
profileImagePath: '',
shouldChangePassword: true,
userEmail: 'admin@immich.app',
userId: expect.any(String),
},
},
user1oauth: {
response: {
accessToken: 'cmFuZG9tLWJ5dGVz',