Skip to content

High performance self-hosted photo and video management solution.

chore: remove unused stubs (#9647)

Jason Rasmussena3489d604baf
diff --git a/server/test/fixtures/auth.stub.ts b/server/test/fixtures/auth.stub.ts
index 96a0bc0141..e260ee4e8f 100644
--- a/server/test/fixtures/auth.stub.ts
+++ b/server/test/fixtures/auth.stub.ts
@@ -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: '[email protected]',
- password: 'Password123',
-};
-
-export const userSignupStub = {
- ...adminSignupStub,
- memoriesEnabled: true,
-};
-
-export const loginStub = {
- admin: {
- email: '[email protected]',
- password: 'Password123',
- },
-};
-
export const authStub = {
admin: Object.freeze<AuthDto>({
user: {
diff --git a/server/test/fixtures/error.stub.ts b/server/test/fixtures/error.stub.ts
deleted file mode 100644
index 7e4399d7e5..0000000000
--- a/server/test/fixtures/error.stub.ts
+++ /dev/null
@@ -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',
- },
-};
diff --git a/server/test/fixtures/uuid.stub.ts b/server/test/fixtures/uuid.stub.ts
deleted file mode 100644
index b10ef80da7..0000000000
--- a/server/test/fixtures/uuid.stub.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export const uuidStub = {
- invalid: 'invalid-uuid',
- // valid uuid v4
- notFound: '00000000-0000-4000-a000-000000000000',
-};