1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00

chore: remove unused stubs (#9647)

This commit is contained in:
Jason Rasmussen 2024-05-21 12:35:26 -04:00 committed by GitHub
parent 00b5ad3421
commit a3489d604b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 75 deletions

View File

@ -3,24 +3,6 @@ import { SessionEntity } from 'src/entities/session.entity';
import { SharedLinkEntity } from 'src/entities/shared-link.entity';
import { UserEntity } from 'src/entities/user.entity';
export const adminSignupStub = {
name: 'Immich Admin',
email: 'admin@immich.app',
password: 'Password123',
};
export const userSignupStub = {
...adminSignupStub,
memoriesEnabled: true,
};
export const loginStub = {
admin: {
email: 'admin@immich.app',
password: 'Password123',
},
};
export const authStub = {
admin: Object.freeze<AuthDto>({
user: {

View File

@ -1,52 +0,0 @@
export const errorStub = {
unauthorized: {
error: 'Unauthorized',
statusCode: 401,
message: 'Authentication required',
},
forbidden: {
error: 'Forbidden',
statusCode: 403,
message: expect.any(String),
},
wrongPassword: {
error: 'Bad Request',
statusCode: 400,
message: 'Wrong password',
},
invalidToken: {
error: 'Unauthorized',
statusCode: 401,
message: 'Invalid user token',
},
invalidShareKey: {
error: 'Unauthorized',
statusCode: 401,
message: 'Invalid share key',
},
invalidSharePassword: {
error: 'Unauthorized',
statusCode: 401,
message: 'Invalid password',
},
badRequest: (message: any = null) => ({
error: 'Bad Request',
statusCode: 400,
message: message ?? expect.anything(),
}),
noPermission: {
error: 'Bad Request',
statusCode: 400,
message: expect.stringContaining('Not found or no'),
},
incorrectLogin: {
error: 'Unauthorized',
statusCode: 401,
message: 'Incorrect email or password',
},
alreadyHasAdmin: {
error: 'Bad Request',
statusCode: 400,
message: 'The server already has an admin',
},
};

View File

@ -1,5 +0,0 @@
export const uuidStub = {
invalid: 'invalid-uuid',
// valid uuid v4
notFound: '00000000-0000-4000-a000-000000000000',
};