import { describe, expect, it } from 'vitest';
import dayjs from 'dayjs';
import { unavailableDatesCacheKey } from './index';

describe('classroom rental unavailable dates cache', () => {
  it('scopes loaded month keys by classroom id', () => {
    const month = dayjs('2026-07-10');

    expect(unavailableDatesCacheKey(1, month)).toBe('1:2026-07');
    expect(unavailableDatesCacheKey(1, month)).not.toBe(unavailableDatesCacheKey(2, month));
  });
});
