2023-08-01 17:49:50 +02:00
|
|
|
export const errorStub = {
|
|
|
|
unauthorized: {
|
|
|
|
error: 'Unauthorized',
|
|
|
|
statusCode: 401,
|
|
|
|
message: 'Authentication required',
|
|
|
|
},
|
2023-09-02 04:01:54 +02:00
|
|
|
forbidden: {
|
|
|
|
error: 'Forbidden',
|
|
|
|
statusCode: 403,
|
|
|
|
message: expect.any(String),
|
|
|
|
},
|
2023-08-01 17:49:50 +02:00
|
|
|
wrongPassword: {
|
|
|
|
error: 'Bad Request',
|
|
|
|
statusCode: 400,
|
|
|
|
message: 'Wrong password',
|
|
|
|
},
|
|
|
|
invalidToken: {
|
|
|
|
error: 'Unauthorized',
|
|
|
|
statusCode: 401,
|
|
|
|
message: 'Invalid user token',
|
|
|
|
},
|
|
|
|
badRequest: {
|
|
|
|
error: 'Bad Request',
|
|
|
|
statusCode: 400,
|
|
|
|
message: expect.any(Array),
|
|
|
|
},
|
|
|
|
incorrectLogin: {
|
|
|
|
error: 'Unauthorized',
|
|
|
|
statusCode: 401,
|
|
|
|
message: 'Incorrect email or password',
|
|
|
|
},
|
|
|
|
alreadyHasAdmin: {
|
|
|
|
error: 'Bad Request',
|
|
|
|
statusCode: 400,
|
|
|
|
message: 'The server already has an admin',
|
|
|
|
},
|
|
|
|
};
|