import type { TenantContext } from '../../middleware/tenant-auth'
import type { Context } from '../../types/context'

/** Minimal tenant context for unit tests. */
export function testTenantContext(overrides: Partial<TenantContext> = {}): TenantContext {
  return {
    userId: 'test-user-id',
    email: 'test@example.com',
    role: 'USER',
    permissions: {},
    isSystemAdmin: false,
    ...overrides,
  }
}

/** Build a GraphQL Context stub for tests. */
export function testContext(overrides: Partial<Context> = {}): Context {
  return {
    db: {} as Context['db'],
    ...overrides,
  }
}
