import { describe, it, expect } from 'vitest';
import { UserModel } from '../../src/schemas/user.schema.js';

describe('UserModel', () => {
  it('is a valid mongoose model', () => {
    expect(UserModel.modelName).toBe('User');
  });

  it('has expected schema paths', () => {
    const paths = Object.keys(UserModel.schema.paths);
    expect(paths).toContain('keycloakId');
    expect(paths).toContain('displayName');
    expect(paths).toContain('email');
    expect(paths).toContain('householdIds');
    expect(paths).toContain('defaultHouseholdId');
    expect(paths).toContain('createdAt');
    expect(paths).toContain('updatedAt');
  });
});
