import { describe, it, expect } from 'vitest';
import { formatTenantStatus } from './formatTenantStatus';

describe('formatTenantStatus', () => {
  it('should format status 1 as enabled', () => {
    const result = formatTenantStatus(1);
    expect(result.label).toBe('启用');
    expect(result.variant).toBe('default');
  });

  it('should format status 2 as disabled', () => {
    const result = formatTenantStatus(2);
    expect(result.label).toBe('禁用');
    expect(result.variant).toBe('secondary');
  });

  it('should format unknown status as unknown', () => {
    const result = formatTenantStatus(999);
    expect(result.label).toBe('未知');
    expect(result.variant).toBe('outline');
  });

  it('should format status 0 as unknown', () => {
    const result = formatTenantStatus(0);
    expect(result.label).toBe('未知');
    expect(result.variant).toBe('outline');
  });
});