fix issues
This commit is contained in:
@@ -25,7 +25,7 @@ describe('InMemoryAuthRepository', () => {
|
||||
|
||||
const user = User.create({
|
||||
id: UserId.fromString('user-1'),
|
||||
displayName: 'Test User',
|
||||
displayName: 'John Smith',
|
||||
email: 'test@example.com',
|
||||
});
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('InMemoryAuthRepository', () => {
|
||||
|
||||
const user = User.create({
|
||||
id: UserId.fromString('user-2'),
|
||||
displayName: 'User Two',
|
||||
displayName: 'Jane Smith',
|
||||
email: 'two@example.com',
|
||||
});
|
||||
|
||||
@@ -57,13 +57,13 @@ describe('InMemoryAuthRepository', () => {
|
||||
|
||||
const updated = User.create({
|
||||
id: UserId.fromString('user-2'),
|
||||
displayName: 'User Two Updated',
|
||||
displayName: 'Jane Smith Updated',
|
||||
email: 'two@example.com',
|
||||
});
|
||||
|
||||
await authRepo.save(updated);
|
||||
|
||||
const stored = await userRepo.findById('user-2');
|
||||
expect(stored?.displayName).toBe('User Two Updated');
|
||||
expect(stored?.displayName).toBe('Jane Smith Updated');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,22 +5,22 @@ export class PasswordResetRequestOrmEntity {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar' })
|
||||
email!: string;
|
||||
|
||||
@Column({ unique: true })
|
||||
@Column({ type: 'varchar', unique: true })
|
||||
token!: string;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'timestamp' })
|
||||
expiresAt!: Date;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'varchar' })
|
||||
userId!: string;
|
||||
|
||||
@Column({ default: false })
|
||||
@Column({ type: 'boolean', default: false })
|
||||
used!: boolean;
|
||||
|
||||
@Column({ default: 0 })
|
||||
@Column({ type: 'int', default: 0 })
|
||||
attemptCount!: number;
|
||||
|
||||
@CreateDateColumn()
|
||||
|
||||
@@ -13,7 +13,7 @@ describe('UserOrmMapper', () => {
|
||||
const entity = new UserOrmEntity();
|
||||
entity.id = '00000000-0000-4000-8000-000000000001';
|
||||
entity.email = 'alice@example.com';
|
||||
entity.displayName = 'Alice';
|
||||
entity.displayName = 'Alice Smith';
|
||||
entity.passwordHash = 'bcrypt-hash';
|
||||
entity.salt = 'test-salt';
|
||||
entity.primaryDriverId = null;
|
||||
|
||||
@@ -62,7 +62,7 @@ describe('TypeOrmAuthRepository', () => {
|
||||
const domainUser = User.create({
|
||||
id: userId,
|
||||
email: 'test@example.com',
|
||||
displayName: 'Test User',
|
||||
displayName: 'John Smith',
|
||||
passwordHash,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user