diff --git a/apps/api/src/auth/auth.service.spec.ts b/apps/api/src/auth/auth.service.spec.ts index 483dcf72d..8659ddc55 100644 --- a/apps/api/src/auth/auth.service.spec.ts +++ b/apps/api/src/auth/auth.service.spec.ts @@ -41,7 +41,6 @@ describe('AuthService', () => { email: 'test@podkrepi.bg', emailConfirmed: false, phone: null, - company: null, picture: null, createdAt: new Date('2021-10-07T13:38:11.097Z'), updatedAt: new Date('2021-10-07T13:38:11.097Z'), @@ -424,7 +423,6 @@ describe('AuthService', () => { email, emailConfirmed: false, phone: null, - company: null, picture: null, createdAt: new Date('2021-10-07T13:38:11.097Z'), updatedAt: new Date('2021-10-07T13:38:11.097Z'), @@ -473,7 +471,6 @@ describe('AuthService', () => { email, emailConfirmed: false, phone: null, - company: null, picture: null, createdAt: new Date('2021-10-07T13:38:11.097Z'), updatedAt: new Date('2021-10-07T13:38:11.097Z'), diff --git a/apps/api/src/auth/register.controller.spec.ts b/apps/api/src/auth/register.controller.spec.ts index 735130993..f7c630bb7 100644 --- a/apps/api/src/auth/register.controller.spec.ts +++ b/apps/api/src/auth/register.controller.spec.ts @@ -3,6 +3,7 @@ import { Test, TestingModule } from '@nestjs/testing' import { AuthService } from './auth.service' import { RegisterController } from './register.controller' import { RegisterDto } from './dto/register.dto' +import { CompanyModule } from '../company/company.module' describe('RegisterController', () => { let controller: RegisterController @@ -21,6 +22,7 @@ describe('RegisterController', () => { const module: TestingModule = await Test.createTestingModule({ controllers: [RegisterController], providers: [AuthService, AuthServiceProvider], + imports: [CompanyModule], }).compile() controller = module.get(RegisterController) @@ -34,7 +36,7 @@ describe('RegisterController', () => { describe('createUser', () => { const registerDto = new RegisterDto() it('should call createUser', async () => { - expect(await controller.register(registerDto)) + expect(await controller.registerIndividual(registerDto)) expect(spyService.createUser).toHaveBeenCalled() expect(spyService.createUser).toHaveBeenCalledWith(registerDto) }) diff --git a/apps/api/src/bank-transactions/bank-transactions.controller.spec.ts b/apps/api/src/bank-transactions/bank-transactions.controller.spec.ts index dd18fd892..1fe099d13 100644 --- a/apps/api/src/bank-transactions/bank-transactions.controller.spec.ts +++ b/apps/api/src/bank-transactions/bank-transactions.controller.spec.ts @@ -25,6 +25,7 @@ import { SchedulerRegistry } from '@nestjs/schedule' import { EmailService } from '../email/email.service' import { TemplateService } from '../email/template.service' import { MarketingNotificationsModule } from '../notifications/notifications.module' +import { AffiliateService } from '../affiliate/affiliate.service' const bankTransactionsMock = [ { @@ -145,6 +146,7 @@ describe('BankTransactionsController', () => { SchedulerRegistry, EmailService, TemplateService, + AffiliateService, ], }).compile() diff --git a/apps/api/src/campaign/campaign.controller.spec.ts b/apps/api/src/campaign/campaign.controller.spec.ts index 4220c0fc6..d7f863492 100644 --- a/apps/api/src/campaign/campaign.controller.spec.ts +++ b/apps/api/src/campaign/campaign.controller.spec.ts @@ -59,7 +59,6 @@ describe('CampaignController', () => { email: 'user@email.com', emailConfirmed: false, phone: null, - company: null, picture: null, createdAt: new Date('2021-10-07T13:38:11.097Z'), updatedAt: new Date('2021-10-07T13:38:11.097Z'), @@ -226,6 +225,7 @@ describe('CampaignController', () => { blockedAmount: 0, withdrawnAmount: 0, donors: 2, + guaranteedAmount: 0, }, }, ]) @@ -263,6 +263,7 @@ describe('CampaignController', () => { blockedAmount: 0, withdrawnAmount: 0, donors: 2, + guaranteedAmount: 0, }, }, ]) @@ -287,6 +288,7 @@ describe('CampaignController', () => { reachedAmount: 110, currentAmount: 0, blockedAmount: 0, + guaranteedAmount: 0, withdrawnAmount: 0, donors: 2, }, @@ -325,6 +327,7 @@ describe('CampaignController', () => { blockedAmount: 0, withdrawnAmount: 0, donors: 2, + guaranteedAmount: 0, }, }, })