Fakultas Ilmu Komputer UI

auth.ts 1.01 KB
Newer Older
1
import { LoginResponse, UserRole } from 'services/auth/models';
Wulan Mantiri's avatar
Wulan Mantiri committed
2
import { TransactionStatus } from 'services/payment/models';
3

4
5
6
7
8
9
export const validRegistrationValues: { [_: string]: any } = {
  name: 'Doan Didinding',
  email: 'doan@dietela.com',
  password1: 'g8ake1afig',
  password2: 'g8ake1afig',
};
10
11
12
13
14
15
16
17

export const invalidRegistrationValues: { [_: string]: any } = {
  name: 'Doan Didinding',
  email: 'doan@dietela.com',
  password1: '12345678',
  password2: '12345678',
};

18
19
20
21
22
23
24
25
26
27
export const validLoginValues: { [_: string]: any } = {
  email: 'doan@dietela.com',
  password: 'g8ake1afig',
};

export const invalidLoginValues: { [_: string]: any } = {
  email: 'doan',
  password: '12345678',
};

28
29
30
31
32
33
34
export const authResponse: LoginResponse = {
  access_token: 'ax41faf',
  refresh_token: '9tka0kfa',
  user: {
    id: 1,
    email: validRegistrationValues.email,
    name: validRegistrationValues.name,
35
    role: UserRole.CLIENT,
Wulan Mantiri's avatar
Wulan Mantiri committed
36
37
38
    transaction_status: TransactionStatus.UNPAID,
    is_finished_onboarding: false,
    cart_id: 1,
39
40
  },
};