import { describe, expect, it } from 'vitest';
import { canManageAudioFiles } from '@/business/audio-files/selectors';

describe('canManageAudioFiles', () => {
  it('mirrors the MANAGE_AUDIO_FILES grant (director/office_manager/teacher only)', () => {
    expect(canManageAudioFiles('director')).toBe(true);
    expect(canManageAudioFiles('office_manager')).toBe(true);
    expect(canManageAudioFiles('teacher')).toBe(true);
    expect(canManageAudioFiles('support_staff')).toBe(false);
    expect(canManageAudioFiles('owner')).toBe(false);
    expect(canManageAudioFiles('superintendent')).toBe(false);
    expect(canManageAudioFiles('student')).toBe(false);
  });
});
