import { Test, TestingModule } from '@nestjs/testing';
import { VoiceController } from './voice.controller';
import {VoiceService} from "./voice.service";
import {VoiceServiceMock} from "../mocks/voice-service.mock";
import {Config} from "../schemas/config.schema";
import {ConfigService} from "@nestjs/config";
import {ConfigServiceMock} from "../mocks/config-service.mock";
import {FeatureflagService} from "../featureflag/featureflag.service";
import {FeatureflagServiceMock} from "../mocks/featureflag-service.mock";

describe('VoiceController', () => {
  let controller: VoiceController;
  let voiceService: VoiceService;
  let configService: ConfigService;
  let featureflagService: FeatureflagService;

  beforeEach(async () => {
    jest.clearAllMocks();
    const module: TestingModule = await Test.createTestingModule({
      controllers: [
        VoiceController,
      ],
      providers: [
        { provide: VoiceService, useValue: VoiceServiceMock },
        { provide: ConfigService, useValue: ConfigServiceMock },
        { provide: FeatureflagService, useValue: FeatureflagServiceMock },
      ]
    }).compile();

    controller = module.get<VoiceController>(VoiceController);
    voiceService = module.get<VoiceService>(VoiceService);
    configService = module.get<ConfigService>(ConfigService);

  });

  it('should be defined', () => {
    expect(controller).toBeDefined();
  });
});
