2024-04-19 12:47:29 +02:00
|
|
|
import { SessionEntity } from 'src/entities/session.entity';
|
2024-03-20 19:32:04 +01:00
|
|
|
import { userStub } from 'test/fixtures/user.stub';
|
2023-08-01 03:28:07 +02:00
|
|
|
|
2024-04-19 12:47:29 +02:00
|
|
|
export const sessionStub = {
|
|
|
|
valid: Object.freeze<SessionEntity>({
|
2023-08-01 03:28:07 +02:00
|
|
|
id: 'token-id',
|
|
|
|
token: 'auth_token',
|
|
|
|
userId: userStub.user1.id,
|
|
|
|
user: userStub.user1,
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date(),
|
|
|
|
deviceType: '',
|
|
|
|
deviceOS: '',
|
|
|
|
}),
|
2024-04-19 12:47:29 +02:00
|
|
|
inactive: Object.freeze<SessionEntity>({
|
2023-08-01 03:28:07 +02:00
|
|
|
id: 'not_active',
|
|
|
|
token: 'auth_token',
|
|
|
|
userId: userStub.user1.id,
|
|
|
|
user: userStub.user1,
|
|
|
|
createdAt: new Date('2021-01-01'),
|
|
|
|
updatedAt: new Date('2021-01-01'),
|
|
|
|
deviceType: 'Mobile',
|
|
|
|
deviceOS: 'Android',
|
|
|
|
}),
|
|
|
|
};
|