/**
 * 管理后台功能测试
 */
import { describe, it, expect } from 'vitest';
import { adminService } from '../services/admin.service';

describe('管理后台功能测试', () => {
  describe('阶段切换', () => {
    it('应该能切换到投票阶段', async () => {
      const result = await adminService.setPhase('voting');
      expect(result.success).toBe(true);
    });

    it('应该能切换到抽奖阶段', async () => {
      const result = await adminService.setPhase('lottery');
      expect(result.success).toBe(true);
    });
  });

  describe('投票控制', () => {
    it('应该能开启投票', async () => {
      const result = await adminService.controlVoting('open');
      expect(result.success).toBe(true);
    });

    it('应该能关闭投票', async () => {
      const result = await adminService.controlVoting('close');
      expect(result.success).toBe(true);
    });
  });
});
