import { Test, TestingModule } from '@nestjs/testing';
import { LicensesController } from './licenses.controller';
import { LicensesService } from './licenses.service';
import { ConfigModule } from '@nestjs/config';

describe('LicensesController', () => {
  let controller: LicensesController;
  const mockLicensesService = {};

  beforeEach(async () => {
    const module: TestingModule = await Test.createTestingModule({
      imports: [
        ConfigModule.forRoot({
          envFilePath: ['.env.local', '.env'],
          isGlobal: true,
        }),
      ],
      controllers: [LicensesController],
      providers: [LicensesService],
    })
      .overrideProvider(LicensesService)
      .useValue(mockLicensesService)
      .compile();

    controller = module.get<LicensesController>(LicensesController);
  });

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