import { describe, expect, it } from 'vitest';
import { getRoleTenantInput } from '@/business/user-admin/selectors';

describe('user-admin selectors', () => {
  describe('getRoleTenantInput', () => {
    it('maps each role to the tenant context the creator must provide', () => {
      expect(getRoleTenantInput('super_admin')).toBe('none');
      expect(getRoleTenantInput('owner')).toBe('org');
      expect(getRoleTenantInput('superintendent')).toBe('org');
      expect(getRoleTenantInput('principal')).toBe('school');
      expect(getRoleTenantInput('registrar')).toBe('school');
      expect(getRoleTenantInput('director')).toBe('campus');
      expect(getRoleTenantInput('office_manager')).toBe('campus');
      expect(getRoleTenantInput('teacher')).toBe('class');
      expect(getRoleTenantInput('support_staff')).toBe('class');
      expect(getRoleTenantInput('student')).toBe('class');
      expect(getRoleTenantInput('guardian')).toBe('guardian');
    });
  });
});
