import { Test, TestingModule } from '@nestjs/testing';
import { ConfigModule } from '@nestjs/config';
import { WorkflowsService } from './workflows.service';
import { WorkflowsController } from './workflows.controller';

describe('WorkflowsController', () => {
  let controller: WorkflowsController;
  const mockTemplatesService = {};
  beforeEach(async () => {
    const module: TestingModule = await Test.createTestingModule({
      imports: [
        ConfigModule.forRoot({
          envFilePath: ['.env.local', '.env'],
          isGlobal: true,
        }),
      ],
      controllers: [WorkflowsController],
      providers: [WorkflowsService],
    })
      .overrideProvider(WorkflowsService)
      .useValue(mockTemplatesService)
      .compile();

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

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